示例#1
0
 function login()
 {
     //080509
     $this->fCookieFile = $this->email;
     debugg("new cookie" . $this->email);
     $post_data = array();
     $post_data['Email'] = $this->email;
     $post_data['Passwd'] = $this->password;
     $post_data['source'] = "exampleCo-exampleApp-1";
     $post_data['service'] = "cl";
     $post_data['accountType'] = "HOSTED_OR_GOOGLE";
     $this->getHeaders = true;
     $this->getContent = true;
     $response = $this->post_login("https://www.google.com/accounts/ClientLogin", $post_data, null, $http_code);
     if (200 == $http_code or $http_code = "HTTP/1.1 200 OK") {
         $this->fAuth = parent::get_parsed($response, "Auth=");
         $this->isLogged = true;
         return 1;
     }
     $this->isLogged = false;
     return 0;
 }