phppickem
phppickem copied to clipboard
Add ability to auto-update scores via cron job
With these changes, I can now update scores automatically via a cron job without having to manually log in and update.
For example, my cronjob to update every 15 minutes on Monday/Thursday/Sunday after 12pm-12am
*/15 12-23 * * 1,4,7 curl --silent 'http://www.yourdomain.com/getHtmlScores.php?BATCH_SCORE_UPDATE_KEY=yourRandomDefinedValueHere' >> ~/cronlog.txt
my solution to this "problem" was to run a cron script that pulled the scores from either www.nfl.com or sports.espn.go.com and upload them using SQL
I decided to copy getHtmlScores.php to autoScoresUpdate.php and add this code to the copy. I made some minor code/var changes to suite my preferences.