hi all,

        i am having bad authentication error every time i try to login 
using curl in php.

$clientlogin_url = "https://www.google.com/accounts/ClientLogin";;
$clientlogin_post = array(
            "accountType" => "HOSTED_OR_GOOGLE",
            "Email" => 'myemail',
            "Passwd" => 'mypassword',
            "service" => "writely",
            "source" => "myapp"
        );
        
        
        // Initialize the curl object
        $curl = curl_init($clientlogin_url);

        // Set some options (some for SHTTP)
        curl_setopt($curl, CURLOPT_POST, true);
        curl_setopt($curl, CURLOPT_POSTFIELDS, $clientlogin_post);
        curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

        // Execute
        $response = curl_exec($curl);


but every time i try to use this on live server it returns me the error of 
bad authentication and provides me a url.
when i enter that url in the new window it ask me for the verification of 
my account where as from my local wamp server it is been executed 
successfully. and i am able to use my account.

anyone please guide me through this.

thanks in advance.

regards,

Sufyan Khalid

-- 
You received this message because you are subscribed to the Google Groups 
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to