Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A simple procedural PHP script to ping the Foursquare API about a venue and email new checkins

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
README.md

Set this up as a cronjob on a server you control to run at a specified interval. The script expects 15 minutes, so if you choose a different one, change the DateTime->modify() call on line 7 to your preferred interval.

Before scheduling this, change all 4 instances of "Use Your Own" to real values. Currently they're on lines 2, 3, 4, and 33.

notifier.php is written for PHP 5.3, and notifier52.php is compatible with PHP 5.2. I'm sure it'll work with lower versions than that, but I haven't tested them, so use at your own risk. The only real difference between the two at this point is the syntax for defining constants.

Security note: Currently I'm disabling the cert verification for this curl script. This is a bad security practice, but there's no way that I could fix it where it would be portable to other computers, so just go here and sort it out for your own environment: http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/

Here's some more info with a certificate grabber you can use: http://artur.ejsmont.org/blog/content/how-to-properly-secure-remote-api-calls-from-php-application

Something went wrong with that request. Please try again.