我希望做一個的GetRequest到www.seatguru.com,其例如是這樣的:http://www.seatguru.com/findseatmap/findseatmap.php?airlinetext=American+Airlines&carrier=AA&flightno=3180&from=Philadelphia%2C+PA+-+Philadelphia+International+Airport+%28PHL%29&to=&date=07%2F03%2F2013&from_loc=PHL&to_loc=&search_type=
PHP發送get請求,並得到輸出
的問題是,當我要求回來,那隻能說明'Loading ...',這意味着我可以檢查輸出。有什麼辦法可以解決這個問題嗎?
這裏是我的捲髮:
$qry_str = "?airlinetext=American+Airlines&carrier=AA&flightno=3180&from=Philadelphia%2C+PA+-+Philadelphia+International+Airport+%28PHL%29&to=&date=07%2F03%2F2013&from_loc=PHL&to_loc=&search_type=";
$ch = curl_init();
// Set query data here with the URL
curl_setopt($ch, CURLOPT_URL, 'http://www.seatguru.com/findseatmap/findseatmap.php' . $qry_str);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, '3');
$content = trim(curl_exec($ch));
curl_close($ch);
非常感謝。
不要刮你的網站,要求你不要。 – 2013-06-29 22:49:00
哦,我沒有意識到它問我不要。我的錯。 – Martol1ni
真的不奇怪,花費數百萬美元在你的網站上,你不希望別人偷你。 – 2013-06-29 22:53:50