Php simulate GMAIL, HOTMAIL (MSN), YAHOO, 163,126 mailbox login (original), how to deal

Source: Internet
Author: User
Php simulates GMAIL, HOTMAIL (MSN), YAHOO, 163,126 mailbox login (original) has been busy recently. when the end of this 11 holiday, I will post this article, to make these source code open-source, of course, these methods may not be available, but it should be in this direction. because we are currently working on a UCHOME Port station, we plan php to simulate GMAIL, HOTMAIL (MSN), YAHOO, 163,126 email login (original)
I have been busy recently. I will post this article at the end of this 11 holiday to make these source code open-source.

Of course, these methods may not be available, but it should be in this direction, because the current UCHOME Port station

We planned to change the display method in the friend invitation. at first, I didn't care about it. that's all!

When we got this, we found that the place in UCH is made of roaming type, which makes people have no solution and cannot be changed!

Alas, since I have promised to say yes, but now the actual situation is not good, I feel sorry. to solve this problem quickly, on GOOGLE,

Baidu searched it again, and the result was unexpected. in the example of an open-source 126 mailbox, none of the others were found. some cool kept QQ and asked for other source code,

You can buy it with QQ! No comment on this person! I spent some time and finished the whole process, and I was lucky enough to get a few results. due to limited time, I have been working on projects, so I don't care about anything else. now I am giving GMAIL, HOTMAIL (MSN), PHP source code of YAHOO's email contact:



1. GMAIL
PHP code
   
  /I ', $ contents, $ matches); if (! Empty ($ matches) {$ v = $ matches [1]; $ matches = array () ;}}$ server = 'mail'; preg_match ('/
  /I ', $ contents, $ matches); if (! Empty ($ matches) {$ GALX = $ matches [1]; $ matches = array () ;}$ timeStmp = time (); // Step 2: start logging on to $ ch = curl_init (); curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt ($ ch, CURLOPT_URL ," https://www.google.com/accounts/ServiceLoginAuth "); Curl_setopt ($ ch, CURLOPT_COOKIEFILE, COOKIEJAR); curl_setopt ($ ch, CURLOPT_POST, 1); $ fileds =" dsh = $ dsh & Email = ". $ username. "& Passwd = {$ password} & GALX = $ GALX & timeStmp = $ timeStmp & secTok = $ secTok & signIn = Sign in & rmShown = 1 & asts = & PersistentCookie = yes"; curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ fileds); curl_setopt ($ ch, recipe, COOKIEJAR); curl_setopt ($ ch, CURLOPT_TIMEOUT, TIMEOUT); curl_setopt ($ ch, TIMEOUT, true); $ str = curl_exec ($ ch); curl_close ($ ch); // Step 3: check Cookies is a guide page $ ch = curl_init (" https://www.google.com/accounts/CheckCookie?chtml=LoginDoneHtml "); Curl_setopt ($ ch, success, false); curl_setopt ($ ch, success, true); curl_setopt ($ ch, CURLOPT_COOKIEFILE, COOKIEJAR); curl_setopt ($ ch, CURLOPT_COOKIEJAR, COOKIEJAR); curl_setopt ($ ch, CURLOPT_TIMEOUT, TIMEOUT); $ str2 = curl_exec ($ ch); curl_close ($ ch); if (strpos ($ contents, "Security exit ")! = False) {return FALSE;} return true;} // Obtain the email address book-address public function getAddressList ($ username, $ password) {if (! $ This-> login ($ username, $ password) {return FALSE;} // Start to simulate capturing $ ch = curl_init (); curl_setopt ($ ch, CURLOPT_URL ," http://mail.google.com/mail/contacts/data/contacts?thumb=true&groups=true&show=ALL&enums=true&psort=Name&max=300&out=js&rf=&jsx=true "); // Out = json data returned by js. If xml data is not set, curl_setopt ($ ch, CURLOPT_COOKIEFILE, COOKIEJAR) is returned ); /* for xml data returned, you need to set curl_setopt ($ ch, CURLOPT_HTTPHEADER, array ("Content-Type: application/xml"); $ str ="
  
    
     
Pab: searchContacts
    
      
       
FN
      
      
       
True
      
    
     
User: getSignatures
    
    
     
Pab: getAllGroups
    "; Curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ str); */curl_setopt ($ ch, CURLOPT_POST, 1); curl_setopt ($ ch, success, true); curl_setopt ($ ch, CURLOPT_TIMEOUT, TIMEOUT); $ contents = curl_exec ($ ch); curl_close ($ ch); // die ($ contents ); // get mail list from the page information username & emailaddress/* processing preg_match_all ("/
  
   
(. *) <\/String>/Umsi ", $ contents, $ mails); preg_match_all ("/
   
    
(. *) <\/String>/Umsi ", $ contents, $ names); $ users = array (); foreach ($ names [1] as $ k => $ user) {// $ user = iconv ($ user, 'utf-8', 'gb2312'); $ users [$ mails [1] [$ k] = $ user ;} if (! $ Users) {return 'No contacts in your mailbox ';} */$ contents = substr ($ contents, strlen ('while (true ); & START & '),-strlen (' & END & '); return $ contents ;}}$ gamil = new GMAIL; $ res = $ gamil-> getAddressList ('username @ 163.com ', '123'); echo $ res;?>
    
   
  

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.