Jump to content

API Rate Limit String


AndrewFerrara

Recommended Posts

Alight, I'm trying to figure out the error string for an api

http://www.haloreachapi.net/wiki/API_rate_limits

 

The wiki says the limit is 300rpm

 

I tried to run this in two tabs on my browser still won't give me the error string, how can it be done faster?

 

P.s. Api key will be changed in the near future don't waste your time..

 


<?php

$gamertag = "l RaH l";
$url = "http://www.bungie.net/api/reach/reachapijson.svc/game/metadata/30cRxVA9J73esG388CzmOXUVRo5VjYhSfI2qBaqcMzs=";

$t_start = microtime(true);
for($i = 0; $i < 301; $i++) {
$file = file_get_contents($url);
echo "Iteration ".($i + 1)."<br>\n";
}

$exectime = microtime(true) - $t_start;
echo "Execution time: " . round($exectime, 4) . "<br><br>\n\n";
$json = json_decode($file, 1);
print_r($json);


?>

 

Link to comment
Share on other sites

How about three tabs?  How long does each request take?  Eg if each request takes 0.5 seconds on average, you'll need three tabs to make 300 requests in a minute.

 

You can do the requests in parallel in php but that's much trickier than just running multiple copies of the script.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.