|
|
 |
 |
|
 |
 |
|
 |
|
|
|
 |
|
|
|
Some basic things you can do with php:
|
|
|
Hello World. The date is September 3rd, 2010 Here is the IP: 38.107.191.119Here is the HOST: 38.107.191.119
|
 |
 |
|
Here is the php script that was used in the above example:
|
 |
<?php echo '<p>Hello World. The date is '; echo date("F jS, Y"); $IP=$_SERVER['REMOTE_ADDR']; $HOST= gethostbyaddr($IP); echo '<p>Here is the IP:</p>'; echo $IP; echo '<p>Here is the HOST:</p>'; echo $HOST; ?>
|
 |
 |
|
Please note. Many php scripts were written with GetHostByName($REMOTE_ADDR) rather than $_SERVER[‘REMOTE_ADDR’] This, GetHostByName($REMOTE_ADDR) works under IPv4 but behaves differently under IPV6 (nc-rtp.com is on IPV6). Here is what you get if you are using GetHostByName($REMOTE_ADDR) on an IPv6 webserver.
|
 |
 |
|
Hello World. September 3rd, 2010Your IP address is: 38.107.191.119
|
|
|