I have a PHP script on my server, this PHP script gets specified emails from my mySQL database, it then pulls a whole bunch of data from the database which it uses to compose an email which it sends to each email address it pulled from the database.
In order to run this script once a day I have set up a cron job on my server which does so.
When I receive an email sent from this script, in the source of the email, it has the following line: X-PHP-Script: (exact address to PHP script)
My concern is that anyone, at anytime can go to that address and run this script over and over again, not only will it make everyone on the email list very irritated, but it will also clog up my server.
I would like to know if there is anything I can do, to disable someone from being able to run this script themselves, or if there is a better way I should be doing this which would also solve my problem.
Thank you in advance :)