Yes, as long as you have the !# (bang) at the top plus the path to your php.exe or if you call php as
/path to php/php.exe /path/to/script/alerts.php
should work....I'd google it to make sure though.
As one fellow user pointed out in another thread (and I had never thought of this myself)...have a browser on the server (lynx for example) call up the page.