Hi,
For a project I need to schedule several PHP scripts. Some of the scripts are a bit complicated (ie. send mail, do database stuff, use several external webservices, use external files and classes etc). The problem is that these scripts also need to be called from the browser, and they do use some of the variables in the $_SERVER
array (including HTTP_HOST
).
Is there a way to make these kind of scripts work from the commandline, or do I have to rewrite them to be 'commandline-compatible'? Or is it better to use parameters from the commandline that specify the variables that are not available?
We have a server running Windows Server 2008.