i'm trying add event php script using curl functions.  it's not returning , events aren't being added calendar.  can me out?
  this has stumped me last few days, appreciated.
  here's code:
  i have verified in xml, $title, , $eventinfo correct, , 
  //combine last name, first name, , email address 1 variable set title event  $this->httpheadersettings = array('content-type: text/xml', "authorization: authsub                                   token=\"" . $sessiontoken . "\"")  $title = $eventinfo['lname'] . ", " . $eventinfo['fname'] . ", " . $eventinfo['email'];  //create atom feed send off google services event data $xmldata = "<entry xmlns='http://www.w3.org/2005/atom'" .  "xmlns:gd='http://schemas.google.com/g/2005'>" . "<category scheme='http://schemas.google.com/g/2005#kind'" .      "term='http://schemas.google.com/g/2005#event'></category>" .      "<title type='text'>" . $title . "</title>" . <br />      "<content type='text'>" . $eventinfo['desc'] . "</content>" .      "<gd:transparency" .    "value='http://schemas.google.com/g/2005#event.opaque'>" .      "</gd:transparency>" .      "<gd:eventstatus" .    "value='http://schemas.google.com/g/2005#event.confirmed'>" .      "</gd:eventstatus>" .      "<gd:where valuestring='blank'></gd:where>" .      "<gd:when starttime='" . $eventinfo['start'] . "'" .          "endtime='" . $eventinfo['end'] . "'></gd:when>" . "</entry>";  curl_setopt($this->curlresource, curlopt_url, "https://www.google.com/calendar/feeds/default/private/full"); curl_setopt($this->curlresource, curlopt_ssl_verifyhost, 0); curl_setopt($this->curlresource, curlopt_ssl_verifypeer, 0); curl_setopt($this->curlresource, curlopt_post, 1); curl_setopt($this->curlresource, curlopt_header, 1); $this->httpheadersettings[] = 'content-type: text/atom+xml'; curl_setopt($this->curlresource, curlopt_httpheader, $this->httpheadersettings); curl_setopt($this->curlresource, curlopt_postfields, $xmldata); curl_setopt($this->curlresource, curlopt_returntransfer, 1); $response = curl_exec($this->curlresource); return $response; 
        
  this isn't direct answer question, highly recommend take @ php gdata api calendar -- it's easier way access google calendar php. link provided have lots of sample code , information you're trying do.
       
   
Comments
Post a Comment