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

finding key position of specified value in multi-dimensional array
Code: $openedfile = fopen($tfc_file4, "r");
$rc = 1;
while(!feof($openedfile))
{<

Multipe Dynamic Controls & AutoPostback Issue
I currently have a need to create many dynamic controls (Example Textboxes) that need to do a PostBa

MySql timezone
Code: $sql = "SELECT *, date_format(date, '%m/%d/%Y at %I:%i %p' )as date FROM comments WHERE t

How can i use [] tags instead of <> tags for profiles??
On my site im making ive made it so u can register, login and u have a profile which u can update..<

Uploading Filetypes and placing them in seperate folders.
Hello,

first post , and asking for help im afraid. Very new to PHP, was making good progress

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

EXplanation help
Hey all,

I am still fairly new to PHP programming and I am trying to put together a page wher

Taxonomy? Classification? Categorisation?
Not sure if there is a way around this classification problem
I have a supplier who produces

SAP Management Console is blank
Dear All ,

I am facing problem in my des sever suddely in SAP Management Console is blank and

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