Re: lynx and php, slightly OT

From: Date: Wed, 05 Jul 2000 20:43:33 +0000
Subject: Re: lynx and php, slightly OT
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5061@lists.php.net to get a copy of this message
on 7/5/00 12:26 PM, Greg Donald at webmaster@destiney.com wrote: > Sorry for the somewhat off topic post, but I'm running out of people to > ask... > > I got a cronjob that performs this command: > > 30 * * * * /usr/bin/lynx -dump http://localhost/dir/build.php > > /dev/null > > I changed my OS from FreeBSD 2.2.7 to RedHat 6.2 this past weekend, and now > lynx is filling root's mailbox with error messages like this: > > Your terminal lacks the ability to clear the screen or position the cursor. > > And of course the job doesn't run. > > I tried adding -term=VT100 to the string but it didn't change anything. I > also tried changing -dump to -source but that didn't work either. My > build.php script is unchanged for several months now. > > Running /usr/bin/lynx -dump http://localhost/dir/build.php > > /dev/null from > the command line produces no errors. > > Any idea what I'm doing wrong? I am surprised it wouldn't let you do that. Oh well, simple enough to fix. I assume that you are trying to run a php script on a regular basis. This can be done in a couple ways similar to what you are doing. If you have PHP compiled as a CGI, you can simply run it by passing the necessary arguments to the PHP CGI script. If not (which is more likely) you can use either cURL or wget (GNU). Both are utilities that are designed to snag web pages from a command line. Both will have smaller footprints than Lynx. cURL has a richer feature set that includes the ability to POST, use https (which I don't think Lynx can even do), etc. The syntax for wget would be wget http://localhost/dir/build.php -o /dev/null cURL I am pretty sure is curl http://localhost/dir/build.php > /dev/null -k

« previous php.general (#5061) next »