跳到主要內容

發表文章

目前顯示的是 1月, 2009的文章

Reservation Work log(1)

Most of requirements were analysysed in the morning, I've done some things. 1. Create a table in my DB. 2. understanding how google Calendar can do. 3. makeing sure steps of construction. Google Calendar can create many events in the same time. It sounds a good news for me. However, if you shared it with friend and choose " managing and editing ", Calendar owner could not restrict friend delete or modify this Calendar. So, I constructed a Account table in my DB, use php to restrict Users. Maybe it is a stupid way, but it was a only way that i could do. last 3 days, Cheer up!

如何使用Google Calendar API in PHP(1)

http://framework.zend.com/download/webservices 首先到此下載函式庫,解壓縮開來的資料夾內有 demos documentation library test 其中demos可以從裡面看一些範例。 如果只是要用google api那就只要將library拷貝出來到你的資料夾底下就可以 而底下的範例要感謝 FUNction's 無趣隨筆 分享的 此篇文章 中 裡面寫到了使用的方法 在這邊借用一下 建立config.inc.php 檔案內容如下 <?php //以下欄位請依照自己需要調整 $googleAccount = 'user@gmail.com'; //Google 帳號 $googlePassword = 'pwd'; //Google 密碼 $calendarID = 'user@gmail.com'; //$calendarID = 'fr53rl3ot0kn65duem7m9gc9og@group.calendar.google.com'; //Google Calendar 的 ID //這裡透過程式碼動態修改php.ini 的include_path 值,告訴系統Zend Gdata Library 的位置 $slash = (strstr(ini_get('extension_dir'), '/'))?"/":"\\"; //Windows 與Unix 的斜線方向不同,需要考慮到 $includePath = dirname(__FILE__).$slash.'library'; ini_set('include_path', $includePath); //動態設定php.ini //這邊是在設定程式把Zend Gdata Library 載入程式碼中 require_once 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Gdata'); Zend_Loader::loadClass('Zend_Gda