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');
      Zend_Loader::loadClass('Zend_Gdata_Extension_Who');
      Zend_Loader::loadClass('Zend_Gdata_Extension_AttendeeStatus');



      // connect to service

      $gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;

      $usernm = "[email protected]";

      $pass = "myacoount122";

      $client = Zend_Gdata_ClientLogin::getHttpClient($usernm, $pass,
$gcal);

      $gcal = new Zend_Gdata_Calendar($client);



      $title = $_POST['coursename'];


         ;

          $where=$_POST['locationAddress'].", ".$_POST['city'].", ".$_POST
['state'].", ".$_POST['country'];




          $start = date(DATE_ATOM, mktime($sdate_hh, $sdate_ii, 0, $sdate_mm,
$sdate_dd, $sdate_yy));

          $end = date(DATE_ATOM, mktime($edate_hh, $edate_ii, 0, $edate_mm,
$edate_dd, $edate_yy));




                try {

        $event = $gcal->newEventEntry();

        $event->title = $gcal->newTitle($title);

        $event->content = $gcal->newContent($desc);

        $event->where = array($gcal->newWhere($where));

        $when = $gcal->newWhen();

        $when->startTime = $start;

        $when->endTime = $end;

        $event->when = array($when);
        $createdEvent = $gcal->insertEvent($event);

        $eventid = substr($createdEvent->id->text, strrpos($createdEvent->id-
>text, '/')+1);

        } catch (Zend_Gdata_App_Exception $e) {

        echo "Error: " . $e->getResponse();

      }



This is the code i am using ..to add an event..along with this i want
to add a email as attendee and send notifications to this email..

please help me...

Regards,
Aravind.V.k
On Feb 24, 6:39 am, Trevor Johns <[email protected]> wrote:
> 2009/2/23 Aravind V.K <[email protected]>:
>
>
>
> > Hi,
>
> > I managed to create edit and delete events in google calendar from my
> > php page. Now I want to add emails associated to a particular event so
> > that if i change any detail of that event a notification should be
> > sent to them via thisemail..I am able to get the event id now..please
> > help me..
>
> > Thanks and Regards,
>
> > Aravind.V.K
>
> Hi Aravind,
> To do this, you'll need to add thoseemailaddresses as invitees to
> the event. Then, when you are making any changes to the event via the
> API, you'll want to add the gCal:sendEventNotifications XML element in
> the event data sent to our servers.
>
> You can do this in the PHP client as follows:
>
> $eventEntry->setSendEventNotifications(new
> Zend_Gdata_Calendar_SendEventNotifications(true));
>
> --
> Trevor Johns

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data 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-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to