note 22835 added to ref.exec
| From: | jeff at jeffglover dot com | Date: | Mon, 01 Jul 2002 20:00:20 +0000 |
| Subject: | note 22835 added to ref.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32476@lists.php.net to get a copy of this message | ||
I've been trying to write a process threader in PHP and I couldn't for the life of me get
system(), exec() or and of the command functions to sucessfully execute a "lynx -dump"
command. It worked fine from the command line, but not from within a php page.
I ended up using the "wget" command (with the background option) to do it, then removed
it's log. It's messy, but it works.
exec("wget 'http://www.yoursite.com/threads/thread1.php'
-b -O wget-log-1 >&- <&- >/dev/null &");
exec("wget 'http://www.yoursite.com/threads/thread2.php'
-b -O wget-log-2 >&- <&- >/dev/null &");
exec("wget 'http://www.yoursite.com/threads/thread3.php'
-b -O wget-log-3 >&- <&- >/dev/null &");
exec("wget 'http://www.yoursite.com/threads/thread4.php'
-b -O wget-log-4 >&- <&- >/dev/null &");
Good Luck...
--
http://www.php.net/manual/en/ref.exec.php
http://master.php.net/manage/user-notes.php?action=edit+22835
http://master.php.net/manage/user-notes.php?action=delete+22835
http://master.php.net/manage/user-notes.php?action=reject+22835