Jump to content


Photo

Logging Users I.P???


  • Please log in to reply
1 reply to this topic

#1 skatermike21988

skatermike21988
  • Members
  • PipPipPip
  • Advanced Member
  • 100 posts
  • LocationFlorida

Posted 21 March 2006 - 06:51 AM

ok in my memebres area i want to log users i.p's.
reason being if they abuse their privelages they will then get a warning diplayed first. If they continue they will be banned from my site.

How would i have it log peoples i.p?

#2 Humpty

Humpty
  • Members
  • PipPipPip
  • Advanced Member
  • 132 posts

Posted 21 March 2006 - 06:54 AM

I'm assuming if you need to log IP's then you are already familiar with PHP and SQL and databases, (adding and retrieving)...and that all that you require is a way to get thier IP.

$UsIP=$_SERVER['REMOTE_ADDR'];


Just insert $UsIP, (or whatever variable you name it), into the appropriate table / field.

hope that helped
- Humpty
  #> Where does the light go when it goes out?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users