All pastes #389878 Raw Edit

whois

public php v1 · immutable
·published 2007-03-11 00:46 UTC
rendered paste body
<?function getmicrotime() {    $temparray = split(" ",microtime());    $returntime = $temparray[0] + $temparray[1];    return $returntime;}function syscall($command){    if ($proc = popen("($command)2>&1","r")){        while (!feof($proc)) $result .= fgets($proc, 1000);        pclose($proc);        return $result;    }}$starttime = getmicrotime();$tld='at';$host='anyad';$cmd = "whois -c $tld $host.$tld";$cmd=escapeshellcmd($cmd);echo $cmd . "\n";$kommand=syscall($cmd,$result);$mystring = $kommand;$findme  = $host . '.' . $tld;$pos = strpos($mystring, $findme);if ($pos === false) {    echo "The string '$findme' was not found in the string '$mystring'" . "\n";} else {    echo "The string '$findme' was found in the string '$mystring'" . "\n";    echo " and exists at position $pos" . "\n";}$endtime = getmicrotime();$deltat=$endtime - $starttime;echo $deltat . "\n";?>