Connecting Tech Pros Worldwide Forums | Help | Site Map

Format result text using Passthru of System

Robertico
Guest
 
Posts: n/a
#1: Aug 22 '05
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



Alvaro G Vicario
Guest
 
Posts: n/a
#2: Aug 22 '05

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
--
Robertico
Guest
 
Posts: n/a
#3: Aug 22 '05

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