Miscellaneous
|
|
|
|
<?php
// always scour user input $domain=escapeshellcmd($url);
// path to whois $cmd="/usr/local/php/bin/whois $domain";
exec($cmd,$data); $max=count($data); $count=0;
if($max):
while($count <= $max):
echo "$data[$count]<br>";
// check each line returned for the whois server for the domain
if(ereg("Whois Server: ", $data[$count])):
$whoserver=ereg_replace("Whois Server: ", "", $data[$count]);
endif;
$count++;
endwhile;
endif;
if(isset($whoserver)):
$cmd="/usr/local/php/bin/whois -h$whoserver $domain";
unset($data);
exec($cmd,$data);
$max=count($data);
$count=0;
if($max):
while($count <= $max):
echo "$data[$count]<br>";
$count++;
endwhile;
endif;
endif; ?>
|
|
|
Usage Example
|
|
|
Rate This Script
|
|
|
|