Hello All I Got this ERROR
can anyoine know the solution of it
Length Required
POST requests require a Content-length header.
$blogID= "8966040103340507032" ; // the
blog id
$token= $Auth; // the token
successfully retrieved from
ClientLogin Authentication
$entry="<entry xmlns='http://www.w3.org/2005/Atom'>
<title type='text'>Marriage!</title>
<content type='xhtml'>
<div xmlns=\"http://www.w3.org/1999/xhtml\">
<p>Mr. Darcy has <em>proposed marriage</em>
to me!</p>
<p>He is the last man on earth I would ever
desire to marry.</p>
<p>Whatever shall I do?</p>
</div>
</content>
<category scheme=\"http://www.blogger.com/atom/ns#\"
term=
\"marriage\" />
<category scheme=\"http://www.blogger.com/atom/ns#\"
term=\"Mr.
Darcy\" />
</entry>
" ;
$len = strlen($entry);
// init new cURL
$ch =
@curl_init("http://www.blogger.com/feeds/$blogID/posts/
default");
// get HTTP response in script
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
@curl_setopt($ch, CURLOPT_HEADER, true );
// include headers
@curl_setopt($ch, CURLOPT_HTTPHEADER, array
(
"Content-Type: application/atom+xml",
"Authorization: GoogleLogin
auth=$token",
)
) ;
// application/x-www-form-urlencoded
// setting the method to post
@curl_setopt($ch, CURLOPT_POST, 1 );
// attaching the entry
@curl_setopt($ch, CURLOPT_POSTFIELDS, $entry);
// sending the query
$response = @curl_exec ($ch);
$output = curl_getinfo($ch);
echo $response;
echo '<pre>';
print_r($output);
// closing cURL
@curl_close ( $ch ) ;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Picasa Web Albums 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-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---