Retrive client's ip address

 
Post new topic   Reply to topic    Aprelium Forum Index -> Networking Issues
View previous topic :: View next topic  
Author Message
John
Guest





PostPosted: Sun Jun 16, 2002 7:23 am    Post subject: Retrive client's ip address Reply with quote

My script is:

<?
$host = gethostbyaddr($REMOTE_ADDR);

print "Your host name is $host ($REMOTE_ADDR).";
?>

but when I run the script I get this:

Notice: Undefined variable: REMOTE_ADDR in E:\Abyss Web Server\htdocs\test.php on line 11

Notice: Undefined variable: REMOTE_ADDR in E:\Abyss Web Server\htdocs\test.php on line 13
Your host name is John ().


Please help me, thanks
Back to top
TheLinker
-


Joined: 05 Apr 2002
Posts: 165
Location: Oslo, Norway

PostPosted: Sun Jun 16, 2002 7:31 am    Post subject: Reply with quote

Use $_SERVER["REMOTE_ADDR"].
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Networking Issues All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group