我遇到了file_get_contents問題。我需要從這個網址獲取內容:http://steamcommunity.com/market/priceoverview/?currency=1&appid=730&market_hash_name=P250%20|%20Valence%20(Field-Tested)爲什麼file_get_contents()返回「無法打開流:HTTP請求失敗!」? HTTP/1.0 429未知
當我與我的瀏覽器中打開它的作品很好,我的PHP腳本:
$item = "P250 | Valence (Field-Tested)"; $link = 'http://steamcommunity.com/market/priceoverview/?currency=1&appid=730&market_hash_name='.urlencode($item); echo file_get_contents($link);
拋出我這個錯誤:
Warning: file_get_contents(http://steamcommunity.com/market/priceoverview/?currency=1&appid=730&market_hash_name=P250+%7C+Valence+%28Field-Tested%29): failed to open stream: HTTP request failed! HTTP/1.0 429 Unknown