Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 22nd, 2005, 08:05 AM
Robertico
Guest
 
Posts: n/a
Default Format result text using Passthru of System

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
Default 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
Default 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


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles