如何绕过限制apikey drom tmdb?

时间:2016-10-14 19:04:03

标签: php api

我可以从themoviedb绕过限制apikey吗? 因为当我的api获得限制时,我的网站变得空白。 我尝试用数组

制作超过1个apikey
$apikey=array('api1','api2','api3','api4');
$i=array_rand($apikey);
$apikey = $apikey[$i];

但有时我仍然得到空白页面,我的问题是如何绕过限制? 我想当页面空白或apikey是限制然后用下一个apikey重新加载页面

1 个答案:

答案 0 :(得分:1)

从他们的网站

Are there limitations on the number of requests?

We currently rate limit requests to 40 requests every 10 seconds. You can 
inspect the status of your limits by looking at the X-RateLimit response headers.

这意味着您应该查看标题X-RateLimit并减慢您的请求。对于您正在尝试的任何自动化任务,每秒4次请求应该足够重要。