[PHP] - Best Way to Execute Events On Time
Hey Guys,I have written an internal toolutilizingPHP with mysql. I have certain events I need to react on to be checked and carried out at specific times during the day, how would be the best way to...
View Article[PHP] - Best Way to Execute Events On Time
You can run it at a scheduled time using cron, but if you're using Windows, it's slightly different. You can use: if (isset($_SERVER['REQUEST_URI'])) { die('Not a page'); } to keep someone from using...
View Article[PHP] - Best Way to Execute Events On Time
Thanks for that, I just wanted to make sure cron/scheduled task was the way to go, as if there was another standard I'd want to learn it to implement. I had one of those moments where, you know the...
View Article[PHP] - Best Way to Execute Events On Time
I've done it before where you run a command line in Window's scheduled tasks. It worked without any problems.http:/ Opens a new window/php.net/manual/en/install.windows.commandline.php
View Article[PHP] - Best Way to Execute Events On Time
I'm not quite convinced about using REQUEST_URI existence checking, because anyone can enter something like "index.php" at the end of the URI and the check will fail. Checking the key passed with GET...
View Article[PHP] - Best Way to Execute Events On Time
Krizz wrote: It's also good idea to use remote host checking, so if only a certain machine will be supposed to execute the script from scheduler/cron, in order to stop users from doing it manually in...
View Article[PHP] - Best Way to Execute Events On Time
Antal Daavid wrote: REMOTE_ADDR won't work in this case, it's set by the httpd, and isn't available when PHP is running as a job in cron, even so cron only runs on a local machine anyway so it's not...
View Article