PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
hmsg
Forum Commoner
Posts: 42 Joined: Sun May 14, 2006 9:48 am
Post
by hmsg » Fri Feb 02, 2007 9:18 am
How can i get the IP of a user that is entering my url?
With the best regards
Hugo Gomes
onion2k
Jedi Mod
Posts: 5263 Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com
Post
by onion2k » Fri Feb 02, 2007 9:23 am
$_SERVER['REMOTE_ADDR'] will contain the remote user's IP address.
dude81
Forum Regular
Posts: 509 Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City
Post
by dude81 » Fri Feb 02, 2007 9:23 am
hmsg
Forum Commoner
Posts: 42 Joined: Sun May 14, 2006 9:48 am
Post
by hmsg » Fri Feb 02, 2007 9:40 am
Where i can find all the variables of the $_SERVER ?
All like that one and other like $_SERVER['SSL .....whatever'] all that exists?
dude81
Forum Regular
Posts: 509 Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City
Post
by dude81 » Fri Feb 02, 2007 9:45 am
Code: Select all
echo "<pre>";
print_r($GLOBALS);
echo "</pre>";
or
Code: Select all
echo "<pre>";
print_r($_SERVER);
echo "</pre>";
pickle
Briney Mod
Posts: 6445 Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:
Post
by pickle » Fri Feb 02, 2007 9:58 am
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.