RE: [PHP] system command

From: Date: Fri, 26 Oct 2007 19:18:10 +0000
Subject: RE: [PHP] system command
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-263731@lists.php.net to get a copy of this message
>> Use double quotes to get the value of $a or else you get the literal string "$a". >> >> $aa=system("lynx -dump >> http://api.hostip.info/country.php?ip=$a",$location); >> or >> $aa=system('lynx -dump >> http://api.hostip.info/country.php?ip='.$a,$location); >> >> > Thanks! 1st solution did not work for me, but the second one did. > > I still have a problem with it. It prints the info to the page. Can I > suppress this somehow? man lynx ? I don't use lynx and I don't know what you mean by "info to the page". I tried lynx -dump http://www.google.com to try to see what you mean. 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. Sorry. _________________________________________________________________ Climb to the top of the charts!  Play Star Shuffle:  the word scramble challenge with star power. http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct

« previous php.general (#263731) next »