Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3357490
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:38:21+00:00 2026-05-18T02:38:21+00:00

Can you please help me to solve the following problem. I am running a

  • 0

Can you please help me to solve the following problem.

I am running a script to authenticate client from google and then i got the following error

Resource id #4
HTTP/1.0 302 Moved Temporarily Content-Type: text/html; charset=UTF-8 Location: https://www.google.com/accounts/ClientLogin Content-Length: 225 Date: Wed, 10 Nov 2010 06:33:40 GMT Expires: Wed, 10 Nov 2010 06:33:40 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block Server: GSE
Moved Temporarily

The document has moved here. 
0Array ( [authToken] => [error] => No Error )

u can have a look of this error here
http://iphoneappcompany.com/fan_connect/test-c2dm.php

Actually i am trying to use c2dm- cloud to device messaging on my android application

here is the script

$host = ‘www.google.com’;
$usepath = ‘/accounts/ClientLogin’;

// open socket to filehandle(epdq encryption cgi)
$fp = fsockopen( $host, 80, &$errno, &$errstr, 60 );

//check that the socket has been opened successfully
if( !$fp ) {
    $returnArr = array();
    $returnArr['authToken']=0;
    $returnArr['error'] = "$errstr ($errno)";
} else {

    $params = "accountType=HOSTED_OR_GOOGLE&Email=myemail&Passwd=mypassword&service=c2dm&source=appsource";

    //write the data to the request
    fputs( $fp, "POST $usepath HTTP/1.0\n");
    $strlength = strlen( $params );
    fputs( $fp, "Content-type: application/x-www-form-urlencoded\n" );
    fputs( $fp, "Content-length: ".$strlength."\n\n" );
    fputs( $fp, $params."\n\n" );

    //clear the response data
    $output = "";

    //read the response from the remote cgi
    //while content exists, keep retrieving document in 1K chunks
    while( !feof( $fp ) ) {
        $output .= fgets( $fp, 1024);
    }

echo $fp.”
“;
echo $output.”
“;
$returnArr = array();

    if(contains("Error=", $output)){

        $error = strstr($str, 'Error=');
        $final_error = "";

        if(contains("BadAuthentication", $output)){
            $final_error = "BadAuthentication - The login request used a username or password that is not recognized.";
        }else if(contains("NotVerified", $output)){
            $final_error = "NotVerified - The account email address has not been verified. The user will need to access their Google account directly to resolve the issue before logging in using a non-Google application. ";
        }else if(contains("TermsNotAgreed", $output)){
            $final_error = "TermsNotAgreed - The user has not agreed to terms. The user will need to access their Google account directly to resolve the issue before logging in using a non-Google application. ";
        }else if(contains("CaptchaRequired", $output)){
            $final_error = "CaptchaRequired - A CAPTCHA is required. (A response with this error code will also contain an image URL and a CAPTCHA token.)";
        }else if(contains("Unknown", $output)){
            $final_error = "Unknown - The error is unknown or unspecified; the request contained invalid input or was malformed.";
        }else if(contains("AccountDeleted", $output)){
            $final_error = "AccountDeleted - The user account has been deleted.";
        }else if(contains("AccountDisabled", $output)){
            $final_error = "AccountDisabled - The user account has been disabled.";
        }else if(contains("ServiceDisabled", $output)){
            $final_error = "ServiceDisabled - The user's access to the specified service has been disabled. (The user account may still be valid.)";
        }else if(contains("ServiceUnavailable", $output)){
            $final_error = "ServiceUnavailable - The service is not available; try again later.";
        }

        $returnArr['authToken']=0;
        $returnArr['error'] = $final_error;
    }else{
        // we have an authToken
        $toeknString = strstr($str, 'Auth=');
        $token = substr($toeknString, 5);
        setAuthToken($token);
        $returnArr['authToken']= $token;
        $returnArr['error'] = "No Error";
    }
}
print_r($returnArr);
return $returnArr;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:38:22+00:00Added an answer on May 18, 2026 at 2:38 am

    HTTP 302 is not and error.

    It says the page you’r trying to reach has been moved.

    Actually, it is just used to redirect the browser in websites.
    In your case, you have to follow the redirection given by Location: https://www.google.com/accounts/ClientLogin .

    I bet you will have to store cookies from your first request so that the page you are redirected to can serve you content according to your login.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please help with the problem as I can't guess how to solve it. When
Can any one please help me solve this. I am resizing some flash object/embed
I hope you can help me with a problem; first, please don't worry about
I am running into some problems using the regular expression. Can you please help
I need some help for a problem which I can't solve but I think
Any body please can please help me, how to center a JFrame on Mac.
Can you please help to derive a regular expression that matches the bold-italics portion
Can you please help me to write a sed command to remove the price
Can somebody please help me with the if statement and arrays. So for example
Can anybody please help me with a link or document to run jbpm-5.2 on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.