首页 > 代码库 > 根据Email域名获取Email网站地址
根据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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。