RE: [PHP] system command

From: Date: Sat, 27 Oct 2007 13:39:14 +0000
Subject: RE: [PHP] system command
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-263745@lists.php.net to get a copy of this message
>> Maybe something to do with the last line (but I get several lines) >> Return Values >> >> Returns the last line of the command output on success, and FALSE on failure. >> >> > > I have within a web page: > $a=system('/usr/bin/lynx -dump (j2‚êbi 1n¡f5@ > http://api.hostip.info/country.php?ip='.$aa); > ?> > ..... > > later I pickup the variable $a again ... > > The problem for me is that the line $a=system('/usr/bin/lynx -dump > http://api.hostip.info/country.php?ip='.$aa); prints > (before ) the > result ($a). I need the variable within the program, but do not want to > display it. It seems that 'system' includes an 'echo' I always go back to the manual: http://php.net/system Maybe that built-in echo is related to this: "The system() call also tries to automatically flush the web server's output buffer after each line of output if PHP is running as a server module." Check out the other "Program Execution Functions" functions http://php.net/exec particularly http://php.net/manual/en/function.exec.php _________________________________________________________________ Peek-a-boo FREE Tricks & Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us

« previous php.general (#263745) next »