Jump to content


Photo

whats my IP address


  • Please log in to reply
1 reply to this topic

#1 otuatail

otuatail
  • Members
  • PipPipPip
  • Advanced Member
  • 960 posts

Posted 13 May 2006 - 10:14 AM

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.



#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 13 May 2006 - 11:11 AM

If you want to get the vistors ip address trhen you'll this code:
echo $_SERVER['REMOTE_ADDR'];

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users