Hi all,
I wanted to run a PHP file as a cronjob. It is to log the user's activities and trace him.
Also I need it for a forum.
How to start a PHP-File from command line?
Can lynx deal this for me?
Thanks for your statements.
regards, Carsten
see http://www.phpbuilder.com/columns/darrell20000319.php3
but that only works if you have php compiled as cgi, not apache module.
i used to use a perl script that simply hit the php url i wanted to run. check out the LWP::UserAgent module at CPAN
Yeah, good idea.
But you guessed right: I have apache compiled as a module.
My solution: I do not write a telnet-script with simulating the http-get dialogs but I installed lynx on my HP-UX 11.0 box. Fortunately it was available as depot software. :-)
lynx -dump http://host.some.domain/page.php >> lynx.out.log
does all I want...
Thks for your help.
You can do somthing else, i did it on my windows machine.
Using the php gtk, you can do exactly that. you just dont create the GUI! you have the same results.
might try something like this, just came on one of my mailing lists <i> I use Perl as a by-pass. Here's an example from my cron-folder:
#!/usr/bin/perl use LWP::Simple; my $page = get "http://64.65.48.48/web/order.php"; print $page;
Regards, Per M Knutsen</i>
hope that helps i haven't tried it but it shoudl work
I just ran this line from my crontab:
wget http://www.mydomain.com/myscript.php
That downloads the output of myscript.php to my home directory, so I also included this line to clean up the output:
rm myscript*
The only caveat is that if you send wget to http://www.mydomain.com, it actually goes to http://www.mydomain.com:80. That was messing up a script of mine that parsed the URL, until I figured out what was going on, then it was easy to work around it.
Good luck, Arlo Leach www.typea.net
a dash of java script to refreash the page every so often! and keep the page open all the time ;'}
well i told you it was rubbish