Re: trouble using system() with lynx outputting to file
| From: | Drews Junk | Date: | Sun, 01 Oct 2000 16:53:12 +0000 |
| Subject: | Re: trouble using system() with lynx outputting to file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-18213@lists.php.net to get a copy of this message | ||
Thanks for the help - but it hasn't worked. Actually, just to be sure, I tested the exact command you gave me, and couldn't get any results.
I'm currently using the following command:
if (!system("TMPDIR=/tmp /usr/bin/lynx -source -mime_header http://{ url goes here }")) { echo "there was an error"; }
And the output is:
there was an error
So something is wrong, but I can't figure out what. Has anyone else tried using lynx via PHP?
Thanks,
Andrew
When I used lynx to access a web page via an exec call, I had to >do it ike this:
exec("TMPDIR=/tmp /usr/bin/lynx --dump 'http://www.blah.com'");
Try it with that TMPDIR variable and see if it works.
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.I'm having some trouble running the following function in PHP 4.0.2: system("lynx -source -mime_header http://{some url goes here} > headerfile.txt");The command runs fine via telnet, but not from within a PHP file which iscalled from a webpage. PHP does not produce an error. Does anyone know what could be wrong? _________________________________________________________________________