Page 1 of 1

Protecting a particular script...

Posted: Mon Apr 30, 2007 7:44 pm
by Mightywayne
Hello there. I've got a script I run every 12 hours that adds things to a mysql database.

However, all it takes is the server to run the script every 12 hours. I didn't consider someone could figure out the URL and just refresh the script over and over.

So I need a way to block people from doing that, but I'm confused because I think it'd require me to ban user input, but that'd mess with the cron job that does it. Permissions too, I think...

What should I do?

Posted: Tue May 01, 2007 7:33 am
by feyd
Look at what's in $_SERVER when accessed via cron versus HTTP request.