RE: [PHP-WIN] IP address reference
| From: | brother | Date: | Mon, 11 Feb 2002 16:47:42 +0000 |
| Subject: | RE: [PHP-WIN] IP address reference | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-11968@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: brother [mailto:brother@lunarstorm.se]
> <?
> if (getenv ("HTTP_X_FORWARDED_FOR")) {
> $ip = getenv ("HTTP_X_FORWARDED_FOR");
> } else {
> $ip = getenv ("REMOTE_ADDR");
> }
> $host = gethostbyaddr ($ip);
> system ("ping $host");
> ?>
>
> This script will ping the users real adress.
to see it in action:
http://www.schattiga.st/!ptf/tools/ping.php
I tested it with www.safeweb.com when they were open (if they're still
closed)
/bro.