Hi Kuldeep, This is the Google Base API support forum. I recommend you to post on the Google reader help Forum, you will be more likely to find people that could help you with it: http://groups.google.com/group/Google-Reader-Help/
Cheers, Nicolas On Nov 22, 7:58 am, Kuldeep <[EMAIL PROTECTED]> wrote: > As I thought the problem I am facing could be very common, I am > posting it in this group. > > I want to add a blog feed in my Google Reader using Google Reader API. > The unofficial documentation is > here,http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI > > I am making following call to the api. I get SID and the token > successfully in previous calls. But, in this call, I get Error:Length > Required POST requests require a Content-length header. > > $ch = curl_init(); > $sendData = 's=feed/http://www.popkorns.com/rss&ac=subcribe&T='. > $token; > $header[2] = 'Content-Length: '. strlen($sendData); > curl_setopt($ch, CURLOPT_URL, 'http://www.google.com/reader/api/0/ > subscription/edit'); > curl_setopt($ch, CURLOPT_POST, 1); > curl_setopt($ch, CURLOPT_POSTFIELDS, $sendData); > curl_setopt($ch, CURLOPT_HEADER, 0); > curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); > curl_setopt($ch, CURLOPT_COOKIE, $cookie ); > $result = curl_exec($ch); > if($result==false) > echo curl_error($ch); > else { > echo curl_getinfo($ch, CURLINFO_HEADER_OUT); > echo $result; > curl_close($ch); > } > > I am not sure what I am doing wrong. I thought content-length is auto > appended by the cURL call, so why is this error. > > Any help would be greatly appreciated. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Base Data API" 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-Base-data-API?hl=en -~----------~----~----~----~------~----~------~--~---
