$REMOTE_ADDR ever heard of it?

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

Post Reply
User avatar
mikusan
Forum Contributor
Posts: 247
Joined: Thu May 01, 2003 1:48 pm

$REMOTE_ADDR ever heard of it?

Post by mikusan »

Anyone know what are functions that determine user information such as the ip adress and related... i remember seeing and even using $REMOTE_ADDR but it doesn't work anymore... at least it remains blank for me...
will
Forum Contributor
Posts: 120
Joined: Fri Jun 21, 2002 9:38 am
Location: Memphis, TN

Post by will »

it's part of the $_SERVER array...

http://www.php.net/manual/en/reserved.variables.php
User avatar
mikusan
Forum Contributor
Posts: 247
Joined: Thu May 01, 2003 1:48 pm

Post by mikusan »

Bugger... i found out... well for those interested the php manual spits out that it didn't find anything... apparently there are some nifty things you can do at the following address http://www.php.net/manual/en/reserved.v ... les.server

I thought at first you hadta add the $_SERVER['REMOTE_ADDR'] but i am unsure if that is the case but you don't need that and can in fact call this by simply typing $REMOTE_ADDR

Hope this helps some...as it struck me for a while...[/url]
User avatar
mikusan
Forum Contributor
Posts: 247
Joined: Thu May 01, 2003 1:48 pm

Post by mikusan »

HAHA sorry we posted at the same time...thx anyways... :D
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

mikusan wrote:I thought at first you hadta add the $_SERVER['REMOTE_ADDR'] but i am unsure if that is the case but you don't need that and can in fact call this by simply typing $REMOTE_ADDR
If register_globals is off (and it's off by default) you have to use the $_SERVER array to get this value.

Mac
Post Reply