I've got this working:
PHP Code:
/*ANTISPAM WEBSITES*/
if (ereg('^www\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9]+'$_POST['comments']))
{
header("Location: http://www.website.com/error.php");
exit;
}
if (
ereg('^[A-Za-z0-9_-]+\\.[A-Za-z0-9]+'$_POST['comments']))
{
header("Location: http://www.website.com/error.php");
exit;
}
if (
ereg('^http\\:\\/\\/www\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9]+'$_POST['comments']))
{
header("Location: http://www.website.com/error.php");
exit;
}
if (
ereg('^http\\:\\/\\/[A-Za-z0-9_-]+\\.[A-Za-z0-9]+'$_POST['comments']))
{
header("Location: http://www.website.com/error.php");
exit;

How would I shorten this?