2015-11-15 45 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

相关问题