I was writing a .htaccess file for my PHP script. This should only allow access to the index.php, cronjob.php and execute.
.htaccess
index.php
cronjob.php
execute.