2015-11-15 46 views
1

我遇到了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

回答

0

根據到錯誤消息,您從Steam的服務器接收到一個429 HTTP錯誤:

429 Too Many Requests (RFC 6585) 
The user has sent too many requests in a given amount of time. Intended for use with rate limiting schemes. 

Source

相關問題