Forum Moderators: coopster
$Email = htmlspecialchars(stripslashes(strip_tags($Email)));
if ( eregi ( '[a-z¦¦0-9]@[a-z¦¦0-9].[a-z]', $Email ) )
{
$domain = explode( "@", $Email );
if ( @fsockopen ($domain[1],80,$errno,$errstr,3))
{echo("$Email is Valid");}
else
{echo("wrong email entered");}
}
is the problem.
Checking whether the domain is online isn't really useful, because many typo domains are hosted (those examples you gave both are) and there are plenty of people using domains that aren't hosted just for mail.
On a seperate note, the regex pattern you're using doesn't allow for country specifc domains .co.uk, .com.au etc. I'd suggest having a search for a good email validation pattern.