Jump to content

Archived

This topic is now archived and is closed to further replies.

otuatail

whats my IP address

Recommended Posts

I have a small website and using session variables I can create a counter for how many hits I get. I can also create a seperate log giving me dates and times. I think someone is artificialy incrementing this. Can I retreve the IP address and log this as well. I have seen the website whatsmyipaddress.com so it must work.

Desmond.

Share this post


Link to post
Share on other sites
If you want to get the vistors ip address trhen you'll this code:
[code]echo $_SERVER['REMOTE_ADDR'];[/code]

Note, some web browsers hides the ursers ip address, so that code above may return false, therefor no IP address was retrieved.

Share this post


Link to post
Share on other sites

×

Important Information

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.