Connecting Tech Pros Worldwide Help | Site Map

Format result text using Passthru of System

  #1  
Old August 22nd, 2005, 08:05 AM
Robertico
Guest
 
Posts: n/a
Hi,

I tried to use the Passthru and System function to resolve some whois
information.

echo passthru('whois 62.69.168.12') .'<br>';
-or-
$whois = system('whois 62.69.168.12', $retval);

It works fine, but all the result text is at one line. How can i format this
output correctly ??

Regards,


Robertico


  #2  
Old August 22nd, 2005, 08:25 AM
Alvaro G Vicario
Guest
 
Posts: n/a

re: Format result text using Passthru of System


*** Robertico wrote/escribió (Mon, 22 Aug 2005 08:53:10 +0200):[color=blue]
> echo passthru('whois 62.69.168.12') .'<br>';
> -or-
> $whois = system('whois 62.69.168.12', $retval);
>
> It works fine, but all the result text is at one line. How can i format this
> output correctly ??[/color]

As you probably know, carriage returns, tabs and duplicate spaces are
ignored in HTML. You can either enclose your output in <pre></pre> tags or
insert the appropriate HTML tags with nl2br() and str_replace().


--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
  #3  
Old August 22nd, 2005, 09:05 AM
Robertico
Guest
 
Posts: n/a

re: Format result text using Passthru of System


Thx,

Thats what i'am looking for. Couldn't find it googling around. Probably the
wrong search terms.

So it's fixed :-))

Robertico


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
"error_reporting" setting not being recognized in my php.ini file laredotornado@zipmail.com answers 1 October 3rd, 2006 03:25 PM
php extensions and windows... specifically extension_dir Chris Paul answers 3 December 5th, 2005 12:45 AM
Cannot use mail() in IE, only works in a debugger--help baustin75@gmail.com answers 8 October 5th, 2005 06:15 PM
Trouble with system() function Penn Markham answers 9 July 17th, 2005 05:43 AM