View Single Post
Old 05-22-2008, 02:10 PM   #1 (permalink)
webosb
The Contributor
 
webosb's Avatar
 
Join Date: Nov 2007
Posts: 41
Thanks: 24
webosb is on a distinguished road
Default checking email address domains

currently i'm checking with this method:

$email = "godjesus@hotmail.com";
$domain = explode( "@", $email );
if(($domain[1] == "yahoo.com") || ($domain[1] == "hotmail.com")){
echo "its either yahoo or hotmail";
}

is there a better way of doing this or is this the most optimized way?
__________________
"Things you can get access to, you should never memorize." -Albert Einstein
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
webosb is offline  
Reply With Quote