Re: Net tools
| From: | Paolo Dell'Unto | Date: | Sun, 02 Jul 2000 11:01:13 +0000 |
| Subject: | Re: Net tools | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4345@lists.php.net to get a copy of this message | ||
I did something for my site..assuming obviously you are on a unix host....it receives variables from a form suc as $querytype and $host :
Obv. i did it for my needs...feel free to do the same for yours
<?php
switch ( $type ) {
case "dnsquery" :
$cmd = "nslookup ".$host." 194.243.154.62"; // 194. is the DNS server IP
$lastline = exec(EscapeShellCmd($cmd), $result, $rval);
break ;
case "domaininfo" :
if (!isset($whois) ) $whois="whois.networksolutions.com" ;
if (!isset($host) ) break ;
if ( substr ( $host , -2 ) == "it" ) $whois="whois.nic.it" ;
$cmd = "whois ".$host."@".$whois ;
$lastline = exec(EscapeShellCmd($cmd), $result, $rval);
break ;
case "servertype" :
$cmd = "/apache/bin/ab -n 5 http://".$host."/" ;
$lastline = exec(EscapeShellCmd($cmd), $result, $rval);
break ;
default :
echo "what ?";
exit ;
}
for ($i = 0; $i < count($result); $i++)
{
echo $result[$i]."<BR>";
}
?>
Hello, Does anybody know of a PHP program similar to domtools at www.domtools.com? If anybody has seen something like this, it would help me out greatly. Thanks! Tyler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net-------------------------------------------------------------- Paolo Dell'Unto <paolo@dellunto.net> ICQ # 770759 PGP KEY Available on request