PHP script needed to access a Foursquare API method
$30-100 USD
Terminado
Publicado hace más de 13 años
$30-100 USD
Pagado a la entrega
**THE PROJECT:**
I need a PHP script that will access the Foursquare API and return the JSON data from [login to view URL] The script should ping Foursquare no more than once every 30 seconds (Foursquare has a rate limit of 200 requests per method per hour. This will limit the script to a maximum of 120 requests per hour). If the script is accessed in intervals less than 30 seconds, the script should return the JSON data from the previous request.
## Deliverables
**THE PROJECT:**
I need a PHP script that will access the Foursquare API and return the JSON data from [login to view URL] The script should ping Foursquare no more than once every 30 seconds (Foursquare has a rate limit of 200 requests per method per hour. This will limit the script to a maximum of 120 requests per hour). If the script is accessed in intervals less than 30 seconds, the script should return the JSON data from the previous request.
**WORKFLOW:**
1. My iPhone app will access the PHP script you create.
2. The script checks the last time Foursquare was pinged. If it's been more than 30 seconds since the last ping, access Foursquare and cache the JSON response on my server. If it's been less than 30 seconds, utilize the data from the previous response.
3. The JSON data is sent back to my iPhone app.
**OTHER NOTES:**
-Basic authorization is okay for accessing Foursquare
-The Foursquare login information should be hard coded server-side. It will need to be secure. Only 1 specific Foursquare account will be accessed by the script.
-Please provide plenty of comments on the code so that I can have a basic understanding of how it works should I need to edit or update it in the future.