Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle Calendar PHP - Event URL / ID? (Zend_Gdata)
    text
    copied!<p>I have modified my PHP web app to add events to a Google Calendar. Currently, it adds successfully.</p> <p>However, now I wish to delete and edit events. This seems easy to do, except for the fact that I don't know what event URL is associated with each event.</p> <p>Am I supposed to set this event URL (or ID?) upon adding an event? How am I supposed to figure out what it is? </p> <p>I can't seem to find this information anywhere else...</p> <p>Thanks!</p> <p>EDIT:</p> <p>I have been using the Zend Framework for this (Gdata package)...</p> <p>EDIT:</p> <pre><code>$newIncludePath = array(); $newIncludePath[] = '../ZendGdata-1.8.4PL1/library'; $newIncludePath = implode($newIncludePath); set_include_path($newIncludePath); // load classes require_once 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Gdata'); Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); Zend_Loader::loadClass('Zend_Gdata_Calendar'); Zend_Loader::loadClass('Zend_Http_Client'); // connect to service $gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; $user = "********@gmail.com"; $pass = "*****"; $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $gcal); $gcal = new Zend_Gdata_Calendar($client); // construct event object // save to server try { $event = $gcal-&gt;newEventEntry(); $event-&gt;title = $gcal-&gt;newTitle($title); $event-&gt;content = $gcal-&gt;newContent($desc); $when = $gcal-&gt;newWhen(); $when-&gt;startTime = $date; $when-&gt;endTime = $date; $event-&gt;when = array($when); $gcal-&gt;insertEvent($event); echo $event-&gt;getEditLink()-&gt;href; } catch (Zend_Gdata_App_Exception $e) { echo "Error: Unable to add event to Google Calendar" . $e-&gt;getResponse(); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload