<?php /*
Written By Kurth Bemis (kurth@usaexpress.net)
This snippet uses nslookup and grep to retrieve the fully resolved remote address and display it.
Mail me if you have any problems
~kurth
*/
$runext = exec("nslookup $REMOTE_ADDR | grep ame:", $output, $error);
if (!$error){
list(,$run) = each($output);
$display = substr ("$run", 6);
print "Remote Address: $display <BR>";
}
if ($error){
echo "Unix error code: $error<BR>n";
exit;
}
?>
|
|