PHP analog Gmail,hotmail (MSN), yahoo,163,126 mailbox Login (original)

Source: Internet
Author: User
Tags php source code
PHP analog Gmail,hotmail (MSN), yahoo,163,126 email Login (original)
This post was last edited by hudie631489527 on 2010-10-07 23:18:31

have been busy recently, at the end of this 11 holiday, published this article, in order to let these sources open source

Of course these methods may not be desirable, but should be roughly the direction of the bar, due to the current do a uchome RTHK's site

We planned to change the friend invite inside the display way, at first I did not care, then said OK!

To get this time only found that the uch inside this place is to use the roaming type to do, let a person is no solution, what can not change!

Alas, since all agreed to say can, now the actual situation is not, so feel embarrassed, in order to solve this problem quickly, in Google,

Baidu on the search, the results and unexpectedly, on a 126 mailbox Open source example, the other is not, there is a cow brother left QQ said to other source code,

can add QQ buy! No comment on this person! I spent a bit of time, the whole, the result is lucky to get a few, because the time is limited, the current project has been working on the hand, so there is no other, now give Gmail,hotmail (MSN), Yahoo Mail contact PHP source code:



1.GMAIL

Define ("Cookiejar", Tempnam (Ini_get ("Upload_tmp_dir"), "Cookie")); Define the path where cookies are stored and have permission to operate.
Define ("TIMEOUT", 1000); Timeout settings
Class GMAIL
{

Private Function Login ($username, $password)
{
The first step: simulate crawling data on the login page and note the cookies
$cookies = Array ();
$matches = Array ();
Get form
$login _url = "Https://www.google.com/accounts/ServiceLoginAuth";
$ch = Curl_init ($login _url);

curl_setopt ($ch, Curlopt_ssl_verifypeer, false);
curl_setopt ($ch, Curlopt_cookiejar, Cookiejar);
curl_setopt ($ch, Curlopt_returntransfer, 1);
$contents = curl_exec ($ch);
Curl_close ($ch);

Simulation parameters
$name = Array (' DSH ', ' timestmp ', ' Sectok ');
foreach ($name as $v) {
Preg_match ('/ /I ', $contents, $matches);
if (!empty ($matches)) {
$ $v = $matches [1];
$matches = Array ();
}
  • Related Article

    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.