another way of getting IP

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
theclay7
Forum Commoner
Posts: 50
Joined: Wed Feb 19, 2003 3:17 am

another way of getting IP

Post by theclay7 »

hello there,

I want to know if there is another way to get IP address BESIDES using:

$HTTP_SERVER_VARS['REMOTE_ADDR'] ; OR

$GLOBALS[REMOTE_ADDR]; OR

getenv ("REMOTE_ADDR"); OR

$_SERVER['REMOTE_ADDR'] ;

what other way to do that?
User avatar
skateis2s
Forum Commoner
Posts: 37
Joined: Fri Aug 08, 2003 7:22 am
Location: colorado

Post by skateis2s »

This is my fav way even know you listed it...

<? echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?>

so you can put like


Your IP: <? echo $HTTP_SERVER_VARS['REMOTE_ADDR']; ?>
Post Reply