[請益] Curl不出網頁資料?

看板PHP作者 (Reloading......)時間14年前 (2011/04/30 14:13), 編輯推噓1(104)
留言5則, 2人參與, 最新討論串2/2 (看更多)
http://fhy.wra.gov.tw/ReservoirPage_2011/StorageCapacity.aspx 想從上面這個網頁抓一些水情資料 之前以$url = "http://fhy.wra.gov.tw/ReservoirPage_2011/StorageCapacity.aspx"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $contents = curl_exec($ch); preg_match_all('/<td>(.+?)<\/td>/s', $contents, $target); curl_close($ch); echo $contents; var_dump($target); 都能成功抓到 但是今天突然抓不到了lol 有哪位大大能幫我指出錯誤嗎0.0? 感謝ˊˋ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.67.187

04/30 21:13, , 1F
works fine, 再試試 ?
04/30 21:13, 1F

04/30 22:23, , 2F
樓上這位大大妳可以用我的程式碼抓到0.0?
04/30 22:23, 2F

04/30 22:24, , 3F
我下午試了半天 只有這個抓不到 其他比如yahoo之類的都
04/30 22:24, 3F

04/30 22:24, , 4F
能抓到字串
04/30 22:24, 4F

04/30 22:25, , 5F
見鬼= = 剛剛一試又可以了..lol
04/30 22:25, 5F
文章代碼(AID): #1DkwXxW- (PHP)
文章代碼(AID): #1DkwXxW- (PHP)