Get Guest IP.

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
shimmyshine
-


Joined: 01 Jul 2006
Posts: 17

PostPosted: Sun Jul 30, 2006 4:58 pm    Post subject: Get Guest IP. Reply with quote

I have this
Quote:
<?php
$ip = $_SERVER['REMOTE_ADDR'];
?>


But what is wrong? It only displays mine and whenever I do this
Quote:
<?php
if ($ip == '24.144.125.82') {
return 0;
}
$ip = $_SERVER['REMOTE_ADDR'];
?>


It displays nothing.. because its not allowed to display mine..

I wasn't sure if this was only to PhP Problems with Abyss or any so I thought id ask here just in case..

Thanks,

ShimmyShine
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Sun Jul 30, 2006 5:04 pm    Post subject: Reply with quote

Well its only going to display yours because you are the one viewing the page. You should tell the script to save to a text file to get your visitors IP.

Download http://www.abyssunderground.co.uk/files/stats.zip and it will get the stats of your visitors and you can view it online.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
shimmyshine
-


Joined: 01 Jul 2006
Posts: 17

PostPosted: Sun Jul 30, 2006 5:06 pm    Post subject: Reply with quote

Ahh Thankyou very much.. Helps alot!

ShimmyShine
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP 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