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:
Code:
$userip = $_SERVER[REMOTE_ADDR];
mysql_real_escape_string($userip);
"Remember when you store these values in the database to use these two functions INET_ATON() and INET_NTOA(). One is for inserting the IP and one is for extracting it."

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