Created
January 15, 2015 21:48
-
-
Save iksi/00453f6438f548de26e2 to your computer and use it in GitHub Desktop.
Poor man’s cron
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Simple PHP if statement to execute recurring tasks | |
* by executing those when visited by a bot | |
*/ | |
if (preg_match('/slurp|googlebot/i', $_SERVER['HTTP_USER_AGENT'])) { | |
// tasks to execute | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment