Can I run php from a command prompt?

There are couple of ways to accomplish this: 1. Code your page like normal, then call it in a cron job via lynx* (you can also wget on the URL, or links -dump). For lynx, add the following to your crontab: 0 8 * * * /usr/bin/lynx -dump http://localhost/page.

Php > /path/to/logfile/or/dev/null Now, this means your script is in your public web space, so it could be called by anyone who knew the name of the page. You can put the page in a subdirectory and add an . Htaccess file that restricts access to only 127.0.0.1 or you could code the script itself to retrieve the remote IP and make sure it was 127.0.0.1.

2. With PHP installed as a CGI you could also write your page as a shell script. As the first line of your script put the line: #!

-q Don't forget to set the executable bits. If you are running PHP as an Apache DSO, you can build php again without the with-apxs=/blah so it builds the binary executable and install it somewhere like /usr/local/bin. That way you can use php ... more.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions