I believe there's a php command to get a user's IP address. Store that in a variable and compare it to all the values in the database where you have blocked IP's stored.
Something like this in PHP I think would do it.
[php]
$isBlocked = false;
$result = mysql_db_query("$database", "SELECT blocked_ip FROM ip_table");
//loop through all rows returned by result
while ($row = mysql_fetch_array($result))
{
if ($user_IP = $row["blocked_ip"])
{
$isBlocked = true;
}
}
if ($isBlocked)
{
//redirect to YOU ARE BLOCKED page
}
[/php]
Also, as this seems related to your subject of ip blocking:
http://daniweb.com/techtalkforums/thread2176.html
Reputation Points: 92
Solved Threads: 51
Practically a Posting Shark
Offline 856 posts
since Mar 2004