PHP erigi : Depreciated (e-mail validation)

Gearsopedia.net

New Member
Since \[code\]erigi()\[/code\] is deprecated in PHP 5 and I am in a need to validate an e-mail id , so which function should be used...? further please give the format for e-mail validation such as:\[code\]<?phpfunction checkEmail($email) { if(eregi("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $email)) { return FALSE; } list($Username, $Domain) = split("@",$email); if(getmxrr($Domain, $MXHost)) { return TRUE; } else { if(fsockopen($Domain, 25, $errno, $errstr, 30)) { return TRUE; } else { return FALSE; } }}?>\[/code\]
 
Back
Top