Whois data make new rows

I made a simple whois script using PHP whois lookup Class - Web Tools

I get results back like this:

# Copyright (c) 1997- The Swedish Internet Foundation. # All rights reserved. # The information obtained through searches, or otherwise, is protected # by the Swedish Copyright Act (1960:729) and international conventions. # It is also subject to database protection according to the Swedish # Copyright Act. # Any use of this material to target advertising or # similar activities is forbidden and will be prosecuted. # If any of the information below is transferred to a third # party, it must be done in its entirety. This server must # not be used as a backend for a search engine. # Result of search for registered domain names under # the .se top level domain. # This whois printout is printed with UTF-8 encoding. # state: active domain: google.se holder: mmr8008-53808 created: 2003-08-27 modified: 2021-09-18 expires: 2022-10-20 transferred: 2009-03-06 nserver: ns1.google.com nserver: ns2.google.com nserver: ns3.google.com nserver: ns4.google.com dnssec: unsigned delegation registry-lock: locked status: serverUpdateProhibited status: serverDeleteProhibited status: serverTransferProhibited registrar: MarkMonitor Inc

But I want it like this:

# Copyright (c) 1997- The Swedish Internet Foundation. 
# All rights reserved. 
# The information obtained through searches, or otherwise, is protected 
# by the Swedish Copyright Act (1960:729) and international conventions. 
# It is also subject to database protection according to the Swedish Copyright Act.
# Any use of this material to target advertising or similar activities is forbidden and will be prosecuted. 
# If any of the information below is transferred to a third party, it must be done in its entirety. 
This server must not be used as a backend for a search engine. Result of search for registered domain names under the .se top level domain. This whois printout is printed with UTF-8 encoding.

state: active 
domain: google.se 
holder: mmr8008-53808 
created: 2003-08-27 
modified: 2021-09-18 
expires: 2022-10-20 
transferred: 2009-03-06 
nserver: ns1.google.com 
nserver: ns2.google.com 
nserver: ns3.google.com 
nserver: ns4.google.com 
dnssec: unsigned delegation 
registry-lock: locked 
status: serverUpdateProhibited 
status: serverDeleteProhibited 
status: serverTransferProhibited 
registrar: MarkMonitor Inc

How do I make the output in new lines ?

Apply nl2br() when you echo the output to a browser.

1 Like

Yes it worked,Thanks!

Sponsor our Newsletter | Privacy Policy | Terms of Service