I have a PHP script that runs every hour (cron job) to clean up/delete views in a temp views table in my database.
Currently, the URL is:
http://example.com/api/clean.php
However, this is accessible by any user, so the script can run due to someone accessing the link and it's easy to guess.
If I made the URL some random string:
http://example.com/api/090b235e9eb8f197f2dd927937222c5703.php
would anyone be able to "discover" it to run the script? Is there a better way to block people from accessing the script?