1

我在使用 file_get_contents 时遇到问题。我需要从这个网址获取内容:http://steamcommunity.com/market/priceoverview/?currency=1&appid=730&market_hash_name=P250%20|%20Valence%20(Field-Tested)

当我用浏览器打开它时效果很好,我的 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

4

1 回答 1

0

根据错误消息,您从 Steam 的服务器收到一个429HTTP 错误:

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.

资源

于 2015-11-15T11:48:43.837 回答