Results 1 to 3 of 3
Jul 1, 2009, 16:34 #1
- Join Date
- Nov 2004
- 0 Post(s)
- 0 Thread(s)
Capturing IP address & blocking IP address
I'm using a php script for my web site which has registration, log-in, etc.
When I asked how I might be able to capture the registrants IP address upon registration, I was given this code and this advice:
$userip = $_SERVER[REMOTE_ADDR]; mysql_real_escape_string($userip);
I don't know what INET_ATON() and INET_NTOA() are, but my goal is to be able to have a users IP address just in case he spams my site, then he can be blocked, based on the thinking that typically one user has one computer.
Can someone tell me how I can block an Ip address?
Any thoughts/replies/suggestions will be welcome. Thanks