Justtechjobs.com Find a programming school near you






Online Campus Both


php-windows | 2002071

RE: [PHP-WIN] Getting users IP Address From: brother (brother <email protected>)
Date: 07/02/02

This script will make the server ping the visitor =)

<?
if (getenv ("HTTP_X_FORWARDED_FOR")) {
  $ip = getenv ("HTTP_X_FORWARDED_FOR");
} else {
  $ip = getenv ("REMOTE_ADDR");
}
$lastline = exec( "ping $ip", $resultsArray );
for($i=0; $i < sizeof($resultsArray); $i++)
{
        echo $resultsArray[$i] . '<br>';
}
?>

> -----Original Message-----
> From: R.S. Herhuth [mailto:ronherhuth <email protected>]
> Sent: den 2 juli 2002 16:17
> To: php-windows <email protected>
> Subject: [PHP-WIN] Getting users IP Address
>
>
>
> How do I get a users IP address using either Javascript or PHP?
>
> Thanks,
> Ron
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php