.asp
URLからXMLデータを取得する必要があり、どこが間違っているのかわかりません。試してみました:.asp URLでXMLファイルを取得する
<?php
$url = "http://bookings.emperordivers.com/webScheduleSpecificXML_all.asp";
$feed = file_get_contents($url);
$xml = simplexml_load_string($feed);
// Display the first post title
echo $xml->Schedules->Schedule[0]->Boat;
私はこれが働くことを望んだが、の.asp URLはそれほど代わりに試さ何とかブロックしていることが疑わ:両方の場合
function get_data($url) {
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$returned_content = get_data('http://bookings.emperordivers.com/webScheduleSpecificXML_all.asp');
$xml = simplexml_load_string($returned_content);
// Display the first post title
echo $xml->Schedules->Schedule[0]->Boat;
美しい白い画面。これを稼働させる簡単なトリックはありますか?
どのような状況下で私は、私の質問に、「緊急」または他の同様の句を追加することができます[お読みください](// meta.stackoverflow.com/q/326569) - 要約は、これはボランティアに対処する理想的な方法ではなく、おそらく回答を得ることに非生産的であるということです。これをあなたの質問に追加しないでください。 – halfer