<?php
include_once('./ping.class.php');
function PrintUsage($string = '')
{
if($string != '') {
echo $string . "\n\n";
}
echo 'php index_whois.php [addr]' . "\n";
echo "\t" . '[addr]: The domain to query info\'s form...' . "\n";
die("\n");
}
if($argc <= 1) {
PrintUsage('Paramètre(s) invalide(s)...');
die("\n");
}
$ping = new CPing();
$config['value'] = $argv[1];
$config['serveur_index'] = 0;
$result = $ping->WhoIs($config);
if($result !== false)
echo $result . "\n";
else
echo 'Error occured while quering WhoIs server...' . "\n";
?>
|