Thread: IP Address
View Single Post
  #2  
Old 08-20-2002, 11:33 PM
Keefe Keefe is offline
Administrator
 
Join Date: May 2002
Location: Wisconsin
Posts: 2,337
Send a message via ICQ to Keefe Send a message via AIM to Keefe Send a message via MSN to Keefe Send a message via Yahoo to Keefe
Default

You could use something like this...

Code:
<?
print "<html>\n";
print "<head><title>Your IP Address</title></head>\n";
print "<body bgcolor=#FFFFFF>\n";
print "<h2 align=center>Computer Information</h2>\n";
print "<hr noshade width=50%>\n";
print "<table border=0 cellpadding=2 cellspacing=2 align=center>\n";
print "<tr>\n";
print "  <td align=right>IP Address:\n";
print "  <td align=left>$REMOTE_ADDR</td>\n";
print "</tr>\n<tr>\n";
print "  <td align=right>Hostname:</td>\n";
print "  <td align=left>" . gethostbyaddr($REMOTE_ADDR) . "</td>\n";
print "</tr>\n</table>\n";
print "<hr noshade width=50%>\n";
print "</body>\n";
print "</html>\n";
?>
Reply With Quote