Hi, I have registered my site with Google, uploaded a RSA key file and
am able to use the OAuth Playground to send and receive data
properly.  However, when I generate the requests in my PHP scripts I
either get a "HTTP 302 Moved Temporarily" response or some SSL
Protocol Violation error.  I have verified with the OAuth Playground
that I am generating the signature correctly and so my parameters
should all be correct, therefore I am assuming there is something
wrong with how I am either sending or retrieving the HTTP headers.

Can someone have a look at the code snippet below and see if they can
find anything wrong?  Any help would be greatly appreciated.  Thanks
very much!  -Brian

if ($fp = fsockopen('ssl://www.google.com', 443, $errno, $errstr, 60))
{

        fwrite($fp, "GET /accounts/OAuthGetRequestToken HTTP/1.1\r\n");
        fwrite($fp, "Host: https://www.google.com\r\n";);
        fwrite($fp, "Content-Type: application/x-www-form-urlencoded\r\n");
        fwrite($fp, 'Authorization: OAuth oauth_version="1.0", oauth_nonce="'.
$nonce.'", oauth_timestamp="'.$time.'",
oauth_consumer_key="www.mysite.com", oauth_signature_method="RSA-
SHA1", oauth_signature="'.$oauth_sig.'"');
        fwrite($fp, "\r\n\r\n");
        fwrite($fp, "scope=http://www.blogger.com/feeds";);

        while (!feof($fp)) {
                echo fgets($fp);
                }
        }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data Protocol" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to