Jump to content
xisto Community
Sign in to follow this  
cragllo

Show Visitors Ip Addresss

Recommended Posts

This is one choice!! Posted Image

i usually use this for count my user and show ip. i got user more...

 

if (getenv(HTTP_CLIENT_IP)) { // check ip from share internet  $ip = getenv(HTTP_CLIENT_IP);} elseif (getenv(HTTP_X_FORWARDED_FOR)) { // ip is pass from proxy??  $ip = getenv(HTTP_X_FORWARDED_FOR);} else {  $ip = getenv(REMOTE_ADDR);}
Edited by moderator (see edit history)

Share this post


Link to post
Share on other sites

What do you mean Last IP? Go to the page where that code it, and then go into dos and type in ipconfigit the ip's match, then it is working ok...if you nitice there is a space between the < and the ?, take taht out, so it should look like <? try that...

Edited by cragllo (see edit history)

Share this post


Link to post
Share on other sites

i tried it and it doesn't work for me either, i get this error:

Notice: Undefined variable: REMOTE_ADDR in c:program fileseasyphp1-7wwwindex.php on line 10

Code i used is:

<p><?php echo "Your IP is $REMOTE_ADDR"; ?></p>

the page is located here: http://forums.xisto.com/no_longer_exists/ (this is my home pc/server btw, its not always up lol... sorry if its down)
Edited by moderator (see edit history)

Share this post


Link to post
Share on other sites

Use

<?If (getenv(HTTP_CLIENT_IP)) {$ip = getenv(HTTP_CLIENT_IP);} elseif (getenv(HTTP_X_FORWARDED_FOR)) {$ip = getenv(HTTP_X_FORWARDED_FOR);} else {$ip = getenv(REMOTE_ADDR);} Echo "Your IP is $ip";?>

already script for you.

 

-reply by AnonymousKeywords:

Edited by moderator (see edit history)

Share this post


Link to post
Share on other sites

I've got a better idea. You visit the site Ip-Details and there is a code which you copy and paste in the website program will be displayed in your site. It shows not only the ip address but also the location and the address of the visitor.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.