Wadah Belajar Linux, Debian, Mikrotik, Networking, Routing, dan Ilmu Pendukungnya

< Browse > Home / script / Blog article: PHP Whois Script

| Mobile | RSS

PHP Whois Script

August 22nd, 2008 | 1 Comment | Posted in script

Pastikan sudah terinstall web server lengkap dengan phpnya, script ini pake jwhois jadi install dulu yah.

#apt-get install jwhois

Trus scriptnya :

<?php
$data=$_POST['data'];
if($data) $raw=exec(“/usr/bin/jwhois $data”,$out);
?>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html><!– InstanceBegin template=”/Templates/runningX.dwt.php” codeOutsideHTMLIsLocked=”false” –>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<!– InstanceBeginEditable name=”doctitle” –>
<?php
if($data) echo “<title>zulfanruri Whois Lookup for $data</title>”;
else echo “<title>zulfanruri Whois Lookup</title>”;
?>
<!– InstanceEndEditable –><style type=”text/css”>
</style>
<!– InstanceBeginEditable name=”head” –>
<style type=”text/css”>
<!–
.style3 {
color: #000000;
font-weight: bold;
}
–>
</style>
<!– InstanceEndEditable –>
</head>

<body>
<table width=”100%” border=”0″ cellspacing=”0″>
<tr>
<td> </td>
</tr>
<tr>
<td><div align=”center”>

<form name=”ip2country” action=”#” method=”post”>
<input type=”text” name=”data” size=”40″ value=”<?php echo $data; ?>”>
<input type=”submit” value=”Lookup”></form> </div></td>
</tr>
<tr>
<td><div align=”center”></div></td>
</tr>
<tr>
<td><div align=”center”><strong> <?php if($data) echo “Whois record for $data”; ?></strong></div></td>
</tr>
<tr>
<td> <dir><?php
if($data)
for($i=0;$i<=count($out);$i++)
echo $out[$i].”<br>”;
?></dir></td>
</tr>
</table>
</body>
<!– InstanceEnd –></html>

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogosphere News
  • Live
  • MisterWong
  • MySpace
  • Ping.fm
  • Slashdot
  • StumbleUpon
  • Technorati
  • Print
  • email
Leave a Reply 1830 views, 3 so far today |

Related Posts

Follow Discussion

One Response to “PHP Whois Script”

  1. Zinnia Says:

    Good post.

Leave a Reply




View My Stats