PHP Whois Tutorial - php Form

Author Topic: PHP Whois Tutorial  (Read 4247 times)

djape

  • Guest
PHP Whois Tutorial
« on: December 17, 2009, 04:58:31 PM »


Net_Whois Folder
Net_Whois class provides a tool to query internet domain name and network number directory services
http://pear.php.net/package/Net_Whois/download

PEAR.php PEAR5.php files
PEAR Base System
http://pear.php.net/package/PEAR/download

Net Folder
Network Socket Interface
http://pear.php.net/package/Net_Socket/download

who.php
Code: [Select]
<form action="whois.php" method="post">
 <table style="font-family:arial" align="center" valign="middle">
  <tr>
   <td>
     Domain name: e.g. google.com
   </td>
   <td>
       <input type="text" name="text">
   </td>
  </tr>
  <tr>
   <td>
      <input type="submit" name="submit">
   </td>
 </tr>
</table>
</form>

whois.php
Code: [Select]
<?php
include("Net_Whois/Whois.php");
$whois = new Net_Whois();
$result $whois->query($_POST['text']);
echo 
"<br><pre>".$result."</pre>";
?>


« Last Edit: December 22, 2009, 05:14:26 PM by admin »

Offline vidra

  • Supporter
  • **
  • Posts: 1
  • Karma: +1/-0
    • View Profile
Re: PHP Whois Tutorial
« Reply #1 on: December 25, 2009, 10:56:39 AM »
Thanks djape, very helpful!  :) :)

Offline janos

  • Contributor
  • *****
  • Posts: 43
  • Karma: +3/-0
    • View Profile
Re: PHP Whois Tutorial
« Reply #2 on: July 08, 2011, 06:22:55 PM »
Thanks for code also. It worked and was very helpful for me.  :D