How to limit the calls to an API


Posted on 16th Feb 2014 07:03 pm by admin

Hello, in my simple script I call an api which effectively involves me getting an xml file.

However the problem is everytime I get a visitor to the webpage it calls the API which means lots of wasteful calls to the API as the data their end isn't updated more than once an hour or something.

I know how to cache and retrieve the data but what command/s are used to tell my server only to call the API every hour and thus update the cache?

Thanks

No comments posted yet

Your Answer:

Login to answer
70 Like 49 Dislike
Previous forums Next forums
Other forums

getting Vars to pass to next page.
Hello all,
I have a confusing situation on my hands, i am a member of a gaming community and we

whats wrong with my code please help!!!
this is the error


Warning: mysql_close(): supplied argument is not a valid MySQL-Link res

fire away
i launched about 4 months ago as a lagit co. i have 2 paying clients, 1probono, 1 side progect, and

cURL Sending File as Post
This is a bit complicated, I'm just hoping someone else has run into this and knows how to do it a d

error with opendir
when i do this

if ($handle = opendir($dir)) {
while (false !== ($file = readdir($han

IS this code correct
The reason i ask is everything underneath it appears to be alink as well, tis blimmin annoying

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

$variable $variables type question
I need to be able to designate an array element dynamically, so I thought to use a variable variable

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash