RE: system command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> 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 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
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux