如何使用PHP或JavaScript请求Steam API超过10000次? [英] How to request Steam API over 10000 times with PHP or JavaScript?

查看:90
本文介绍了如何使用PHP或JavaScript请求Steam API超过10000次?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为所有项目价格致电10000以上的Steam市场API.我想将它们保存在我的MySQL数据库中.但是我的要求总是崩溃.有太多方法可以调用API来处理过多请求吗?

I need to call Steam market API over 10000 request for all items price. And I want to save them in my MySQL database. But my request is always crash. Is there any way to call API for too much request?

 file_get_contents("http://steamcommunity.com/market/priceoverview/?country=US&currency=1&appid=570&market_hash_name=$marketHashName")

示例:

http://steamcommunity .com/market/priceoverview/?country = US& currency = 1& appid = 570& market_hash_name = Dragonclaw%20Hook

推荐答案

Steam API限于每天每天100,000个请求-尚不清楚是一天是24小时内还是基于日历天.过去,我已经从同一个IP地址发出了数千个请求,而没有任何问题.

The Steam API is limited to 100,000 requests per day -- whether a day is within a 24 hour period or based on calendar day isn't exactly clear. I've made thousands of requests from the same IP address without any problems in the past.

您是否收到403响应码?如果是这样,则可能是您达到了速率限制.如果使用多个IP地址会有所帮助,我也会感到惊讶,因为速率限制可能与您的API密钥相关联.

Are you getting a 403 response code? If so, you might be hitting the rate limit. I would also be surprised if using multiple IP addresses will help since the rate limit is probably associated with your API key.

这篇关于如何使用PHP或JavaScript请求Steam API超过10000次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆