Hello,
You are missing the 'Content-length' in the header:
[CODE]
...
xml = $contactAtom->saveXML();
print $xml;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$curlheader[0] = sprintf("Authorization: AuthSub token=\"%s\"/n
GData-Version:\"3.0\" ", $token);
$curlheader[1] = 'Content-Type: application/atom+xml';
$curlheader[2] = 'Content-Length: ' . strlen($xml);
...
[/CODE]
I hope this helped!
Best,
Alain
--
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html