Get and put event google calender - php

I'm creating a website to manage my colleague's work load (you know assign stuff to them).
I want to use Google calendar to know their free times. Is it possible to get their events from Google calendar and then send mine? (to prevent any possible overlaps)
My language is PHP btw

You can do this using the Google APIs Client Library for PHP.
There a Simple example for using the calendar API.

Related

How can I sync events from yahoo/google calendar with MySql? - in PHP for a web app

I want to make a web app that will show some data from a MySQL database, and I need it to be able to connect to Yahoo/Google calendars from each user, so the user will add his calendar when he registers. Is that possible?
Google Calendar allows Web application developers to access user-generated content and event information through its REST-based Developer API. PHP's SimpleXML extension and Zend's GData Library are ideal for processing the XML feeds generated by this API and using them to build customized PHP applications. This article introduces the Google Calendar Data API, demonstrates how you can use it to browse user-generated calendars; add and update calendar events; and perform keyword searches.
Here is the article tutorial for that go to this link and learn how to do that. I think that will help you.

Creating a Google Calendar remotely

I've been researching this question for the last few weeks and have had no success trying to connect to Google through OAuth1 OR 2.
I have a client that needs a separate Calendar for each of the homes they are building. On creation of a new home in the database, I want to create a calendar and save the Id of the created calendar.
What options do I have to do this?
It seems like the only way is to have the user get redirected to Google and login to add a calendar... I want to use a static Google account and simply create the calendar that way, without having the annoying "Login to google" screen.
Google api lets you to do whatever you need with a Calendar using their provided libraries. Let's take a look: Google Developer: Instantiate Google Calendar
This SO posts discusses that. Specifically pay attention to the line in the accepted answer where it is mentions the process for adding a new calendar is similar to adding an event.
SO: Google Calendar API Selecting and creating Calendars
I also came across this tutorial which may be helpful in terms of other actions on the calendar once it has been created.
IBM Developer Works: Integrate your PHP Application with Google Calendar

Integrating Outlook Calendar to Website / Other

When the users add events to the online calendar they also can be added to the outlook calendar (synchronize). Obviously a site built using PHP can not integrate with desktop application directly, so I am looking alternative options.
Options I found:
Using PHP ICAL library creates an .ics file and the user can download it and install. Not the most user friendly way of doing it, might work.
Use SharePoint or exchange server- but have no previous experience working Microsoft technologies, so it not ideal.
Use Google Calendar and Zend Library (gdata), create online calendar and add events to that. Then using Google Calendar Sync tool the user can sync the online calendar to outlook. But the problem here is the all users need a gmail account to use the Sync tool, it not ideal when you have thousands of users on the site. Unless I create one global gmail account and create many calendars on that account, if that even possible.
Questions:
Are there any outlook plug-ins paid or free (ideally) that can achieve this?
Are there any web service/ APIs that can achieve this?
Any other ideas or solutions?
Office 365 comes with an REST API that can be used to read/write to calendars.
Here's some documentation on this. http://msdn.microsoft.com/office/office365/api/calendar-rest-operations
Alternatively, the EWS Managed API might be able to help you: http://msdn.microsoft.com/en-us/library/office/dd633696(v=exchg.80).aspx and
http://msdn.microsoft.com/en-us/library/office/dd633702(v=exchg.80).aspx
you could do this by having the outlook subscribe to the online calendar.
with phpicalendar you can have other clients subscribe to your calendars (here)
you may want to tweak the generated .ics file to include X-PUBLISHED-TTL - Recommended update interval for subscription to the calendar
To get the calender event follow these step:
Sign in to Calendar
On the toolbar, click Share
Select the calendar that you want to export/embed.
Click Get a link.
Under Show event details (click Create)
Note: If step number 5 is already performed, just skip it and click Link to event details
Copy the link that you needed and paste it on the desired program/website.
Use EWS exchange webservice to achieve this.
If it is a website with a no. of users u will need to create OU in exchange server and add a admin user who has read permissions to all accounts in the DL.
EWS exposes endpoints where in u can fetch the calendar mail add read and do all kind of operations.
Building off Rahul's idea but using a different approach - Microsoft provides something similar to a "RSS feed" that auto updates each time you GET the URL, except it's an feed of "ICS" event data:
Open up Outlook Web Access (OWA), e.g. if you are using a microsoft.com account the URL might be https://outlook.live.com/calendar/ (if you are using some other Microsoft 365 account the URL may be different)
On the top right, click the Settings icon
Click View all Outlook Settings
Click Calendar > Shared Calendars > and under Publish a calendar, select the calendar, then under Select permissions, choose as appropriate, then click Publish
It will give you HTML and ICS links. Copy the ICS link URL.
Use your favourite programming language/tool/software to periodically do a HTTPS request (using CURL or AJAX or some other HTTP fetch) using GET method to the URL you got in step 5. You will get back a bunch of calendar data in ICS format. Use this however you need. You may be able to find some pre-written code from elsewhere that parses ICS data for you, or you can manually create your own parser code if you have to.

google calendar functions

does anyone know how to create a form to add a google calendar event? It has to have tons of additional fields that just need to go into the body of the event. The code I got from the API is nonfunctional. I'd like to do it with php
You can create your own form however you like. That really does not have any connection to the API.
In order to manipulate Google Calendar from your own site you will have to use the Google Calendar Data API.
The official guide to it is here: http://code.google.com/apis/calendar/data/2.0/developers_guide.html
If you want to use PHP I would highly recommend using the Zend Framework, since it makes using the API a lot easier.
Zend has the functionality to deal with the Google Calendar API.
Documentation is here:
http://framework.zend.com/manual/en/zend.gdata.calendar.html

Zend Framework Project - Calendar: Need web calendar with events (like google calendar) for every user separately

I doing multi users website (it should works for more than 100,000 users) with Zend Framework.
I need to create event calendar like google calendar (If it was possible to use google calendar i will do it- please tell me).
I have to do that from zero or exist some good Calendar that will work well with Zend?
Thanks
Check out full calendar by Arshaw.
This is a jQuery plugin that provides a full-sized, drag & drop calendar just like google calendar. one can also customize it easily.
Full Calenadar Link.
There are some calendars proposals on ZF, e.g. this Zend_Calendar proposal. You can easily extend it with Google Calendar as a data provider.
Take a look at alternative to Google Calendar, written in jQuery: wdCalendar as well.
If you want to do it with Google Calendar, have a look at Zend_Gdata:
Google Data APIs provide programmatic interface to some of Google's online services. The Google data Protocol is based upon the ยป Atom Publishing Protocol and allows client applications to retrieve data matching queries, post data, update data and delete data using standard HTTP and the Atom syndication formation. The Zend_Gdata component is a PHP 5 interface for accessing Google Data from PHP. The Zend_Gdata component also supports accessing other services implementing the Atom Publishing Protocol.
Specifically the chapter on Using Google Calendar:
You can use the Zend_Gdata_Calendar class to view, create, update, and delete events in the online Google Calendar service.
Also see http://code.google.com/apis/gdata/ for more information about Google Data API.
Also see the answers to these questions:
Know of any open source Zend Framework calendar?
Which PHP calendar will suit my needs? Or build my own?
Calendar using Javascript/ PHP/ mySQL
I think that you could use Google Calendar Api. You would need to create a calendar for each user using Calendar Data API. And when a user is logged show him his calendar in a google calendar embed. I didn't try that, but I will try tomorrow. If it is not posible I will let you know.

Categories