It may sound silly first: is there a way to
start a php script without(!) a browser?
(I want to set some variable-controlled mySQL-
statements as watching-dog process)
Well if you are using Windows, you can just put your scripts into your directory that has PHP installed and then from your commmand prompt, do chp>php file.php and it should run in there.
If you are wanting to do mysql commands, couldn't you use Telnet or DOS to do it through there?
If you install PHP as a CGI program instead of as an Apache or ISAPI module, then PHP scripts can be run from the command line just like any other shell script.
This is easier to do in a Unix setting, I believe.
Also, in a Unix setting, you can just use a couple of command-line browsers or browser-emulation tools to run web-based scripts. Lynx is the de facto standard Unix command-line browser, but "wget" (simple) and "curl" (more complex)are a couple of very interesting utilities for "pretending" to be a web browser while really downloading files or running web-based commands.
For your situation, for example, if you are using Unix you could create a bash script, that calls Lynx and tells it to go to a certain PHP page and then do nothing with the results, since it is the PHP page that you actually want to do something. This bash script could be run regularly as a cron job.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.