title: Not able to add a contact into google in PHP curl
body: <p>I want to add a contact with data to google contacts.i am getting error as "There was an error in your request. That's all we know."</p>
  
  <p>The code is as follows</p>
  
  <pre><code>&lt;?php
  $contact_detail='&lt;?xml version="1.0"?&gt;
  &lt;atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005"&gt;
      &lt;gd:name&gt;
          &lt;gd:firstName&gt;John&lt;/gd:firstName&gt;
          &lt;gd:additionalName&gt; test&lt;/gd:additionalName&gt;
          &lt;gd:givenName&gt;Doe&lt;/gd:givenName&gt;
      &lt;/gd:name&gt;
      &lt;gd:email address="john@doe.com" rel="http://schemas.google.com/g/2005#work"/&gt;
      &lt;gd:email address="john2@doe.com" rel="http://schemas.google.com/g/2005#home"/&gt;
      &lt;gd:organization rel="http://schemas.google.com/g/2005#work"&gt;
          &lt;gd:orgName&gt;John Deere&lt;/gd:orgName&gt;
          &lt;gd:orgTitle&gt;Owner&lt;/gd:orgTitle&gt;
      &lt;/gd:organization&gt;
  &lt;/atom:entry&gt;';
  $url="https://www.google.com/m8/feeds/contacts/default/full";
  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_MUTE, 1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
  curl_setopt($ch, CURLOPT_POSTFIELDS, "$contact_detail");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  $output = curl_exec($ch);
  print($output);
  curl_close($ch);
  </code></pre>