Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of John Wetsell  >  Add to Google Calendar  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: A simple example
Class: Add to Google Calendar
Generate links to add events to Google Calendar
Author: By
Last change:
Date: 2 years ago
Size: 930 bytes
 

Contents

Class file image Download
<?php
error_reporting
(E_ALL E_NOTICE);
if (!isset(
$_SERVER['DOCUMENT_ROOT'])) {
    
$_SERVER['DOCUMENT_ROOT'] = substr($_SERVER['SCRIPT_FILENAME'], 0, -strlen($_SERVER['SCRIPT_NAME']));
}
define("APP_PATH",$_SERVER['DOCUMENT_ROOT'].'/add2gcal/');
require(
APP_PATH '_classes/Autoloader.class.php');
Autoloader::setCacheFilePath(APP_PATH 'tmp/class_path_cache.txt');
Autoloader::excludeFolderNamesMatchingRegex('/^CVS|\..*$/');
Autoloader::setClassPaths(array(
    
APP_PATH '_classes/',
));
spl_autoload_register(array('Autoloader''loadClass'));


echo 
"<pre>";
$params = array('title' => 'New Years Celebration',
        
'datetime' => array('start' => '2012-12-31 20:00''end' => '2013-01-01 02:00'),
        
'location' => 'Lake House',
        
'description' => 'Come celebrate New Years with Bert and Ernie.'
    
);
$link 
$gCal GoogleCalendar::createEventReminder($params);
echo 
$link ";