Looktrne Posted March 23, 2009 Share Posted March 23, 2009 I need to run a php script as a cron job I wrote the script that conects to a database and sends out emails to members my concern is if a robot visits this file it will run the script how can I make the script run only when called as a cron job? should I have it check the IP? or what is the best way to do this thanks for any help Paul Link to comment https://forums.phpfreaks.com/topic/150665-php-script-run-as-a-cron-job/ Share on other sites More sharing options...
trq Posted March 23, 2009 Share Posted March 23, 2009 Put the script outside of your web root and execute it via php's command line interface if you can. Link to comment https://forums.phpfreaks.com/topic/150665-php-script-run-as-a-cron-job/#findComment-791515 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.