PHP Whois 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>

















































October 29th, 2008 at 6:22 am
Good post.