Page 1 of 1

Know IP

Posted: Fri Feb 02, 2007 9:18 am
by hmsg
How can i get the IP of a user that is entering my url?


With the best regards

Hugo Gomes

Posted: Fri Feb 02, 2007 9:23 am
by onion2k
$_SERVER['REMOTE_ADDR'] will contain the remote user's IP address.

Posted: Fri Feb 02, 2007 9:23 am
by dude81

Code: Select all

$ip =$_SERVER['REMOTE_ADDR'];
:P

Posted: Fri Feb 02, 2007 9:40 am
by hmsg
Where i can find all the variables of the $_SERVER ?

All like that one and other like $_SERVER['SSL .....whatever'] all that exists?

Posted: Fri Feb 02, 2007 9:45 am
by dude81

Code: Select all

echo "<pre>";
print_r($GLOBALS);
echo "</pre>";
or

Code: Select all

echo "<pre>";
print_r($_SERVER);
echo "</pre>";

Posted: Fri Feb 02, 2007 9:58 am
by pickle