the `standard` method would be to cron lynx to run the script
Hi Nucl and fire,
Thanks alot....yes the url part is solved.but i am still not get the running of a .php file from telnet.
Nuclez has given me the command but plz make it more clear..
suupose we have the file in /var/www/html/runonshell.php the how can i run this on linux using telnet.
Actully i have to execute the script on an given interval.
Thanks in adv
Have you included:
at the top of your php file (or whatever the path to your PHP installation is)?
If you have cli php installed (did you check by typing "php -v" for your prompt as nucleuz suggested?) then you have two choices...
One, run it as an external file:
or two, at the very top of your php file, add the line that torrent showed:
Then you can chmod it to executable (711) and:
or add it to your cron:
0 9 * * * /path/to/yourfile.php would execute it at 9am everyday
Not sure how else we can help you other than what people have already shared here...
A computer without Windows is like a chocolate cake without mustard.
Just to add to this, you can do this with both the CLI AND the CGI sapi installs. CLI makes a couple of things easier, but either way will still work. An example of one of the ways CLI is helpfull concerns getting data from user input (from the keyboard via STDIN). As an example, with the CGI version one needs to do something like this:Originally Posted by nucleuz
Where as with the CLI sapi, php://stdin is a constant (STDIN).PHP Code:
There is a section of the manual devoted to this. Check it out. It's good stuff. I do a ton of systems level stuff with PHP as my job is mostly DBA / Network / Cluster admin stuff. Who said PHP was just for web development?
Good luck :-)
If you're not on the gas, you're off the gas!