Get email address based on email domain

Source: Internet
Author: User

/**     *  Get email address      *  @param   $email by 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;    } 


This article is from the "I am it migrant workers" blog, please be sure to keep this source http://lfliangli.blog.51cto.com/2853536/1536058

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.