根据Email域名获取Email网站地址
/** * 根据邮箱获取邮箱网址 * @param $email * @return bool|string */ public static function getEmail($email) { $data = array( ‘163.com‘ => ‘mail.163.com‘, ‘vip.163.com‘ => ‘vip.163.com‘, ‘126.com‘ => ‘mail.126.com‘, ‘qq.com‘ => ‘mail.qq.com‘, ‘vip.qq.com‘ => ‘mail.qq.com‘, ‘foxmail.com‘ => ‘mail.qq.com‘, ‘gmail.com‘ => ‘mail.google.com‘, ‘sohu.com‘ => ‘mail.sohu.com‘, ‘tom.com‘ => ‘mail.tom.com‘, ‘vip.sina.com‘ => ‘vip.sina.com‘, ‘sina.com.cn‘ => ‘mail.sina.com.cn‘, ‘sina.com‘ => ‘mail.sina.com.cn‘, ‘yahoo.com.cn‘ => ‘mail.cn.yahoo.com‘, ‘yahoo.cn‘ => ‘mail.cn.yahoo.com‘, ‘yeah.net‘ => ‘www.yeah.net‘, ‘21cn.com‘ => ‘mail.21cn.com‘, ‘hotmail.com‘ => ‘www.hotmail.com‘, ‘sogou.com‘ => ‘mail.sogou.com‘, ‘188.com‘ => ‘www.188.com‘, ‘139.com‘ => ‘mail.10086.cn‘, ‘189.cn‘ => ‘webmail15.189.cn/webmail‘, ‘wo.com.cn‘ => ‘mail.wo.com.cn/smsmail‘, ‘outlook.com‘ => ‘outlook.com‘, ‘mail.dealmoon.com‘ => ‘exmail.qq.com‘, ‘dealmoon.com‘ => ‘www.hotmail.com‘, ); $email_url = substr($email, strpos($email, "@") + 1); $email_url = strtolower($email_url); if (isset($data[$email_url])) { $email_url = $data[$email_url]; } else { $email_url = false; } return $email_url; }
本文出自 “我是IT农民工” 博客,请务必保留此出处http://lfliangli.blog.51cto.com/2853536/1536058
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。