![]() ![]() ![]() ![]() |
|||||
|
|||||
樓主 飲料 ![]()
![]() |
YQL Query 輸入 select * from weather.forecast where woeid in (91982232) and u="c" (桃園的) 得到一個連結 https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(91982232)%20%20and%20u%3D%22c%22&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys 我把這URL 貼在瀏覽器 顯示的是桃園的天氣資料 我使用PHP的curl 卻顯示US的天氣資料 這是為什麼呢? |
別忘捐VP感謝幫助你的人 | 新手會員瞧一瞧 |
1樓
作者回應
飲料 ![]() |
更正
我把這URL 貼在瀏覽器 顯示的是桃園的天氣資料 我使用PHP的curl 卻沒辦法桃園天氣資料 這是為什麼呢?
本篇文章回覆於2017-09-30 17:41
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
2樓 |
網路爬蟲
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) chrome/34.0.1847.131 Safari/537.36'); 試著加這一段看看 有些會認呼叫端是否為瀏覽器
本篇文章回覆於2017-10-20 16:01
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
回覆 |
如要回應,請先登入. |