Redirect visitor using IP

I got spam on my forum. It is an old forum, and I do not have time to upgrade it. From my web statistic, the spammers seems to come from and I tried setting my forum, to block these IPs. But it does not seems to be working.

I’m going to try redirect the visitor from that IP to my other forum filled with spam. Here’s the code:

$visitor = $_SERVER['REMOTE_ADDR'];
if (preg_match("/",$visitor) 
|| preg_match("/",$visitor)) 
Jul 22, 2008 by
GreenGeeks WP Web Host ad ad ad ad