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