don't put the script in a web accessible area.
if your web root is
/home/mysite/www/htdocs
place the script in
/home/mysite/scripts
OR, if you want to be able to run it by going to a link as well,
/home/mysite/www/htdocs/securescripts/
and password protect that directory using .htaccess.
Ontario, huh. Senators or Leafs?