Best practice for storing information from a php script for future use
Posted
by
tRudgeF3llow
on Programmers
See other posts from Programmers
or by tRudgeF3llow
Published on 2014-04-02T02:57:21Z
Indexed on
2014/06/10
3:41 UTC
Read the original article
Hit count: 161
My employer uses forms to help people search for products. The product lists can change from time to time and the forms need to be updated again.
The product information can be accessed through a third party API which I started tinkering with, I've recently built a script that retrieves the information with PHP and creates and populates a form dynamically with Javascript.
So far so good, but...
There are limitations to the API, mainly it can only be accessed a certain number of times per hour, it is probably more than my form/script would use but I want to create a script that is minimally intrusive.
My main question is...
What is the best practice for accessing the information once and storing it long enough to let the API reset? I was wondering about creating a cookie but there is the possibility of users that have them disabled.
(Also, I am doing this as a personal project but I like the people I work for and I think this would help them out.)
Thanks in advance.
© Programmers or respective owner