<?php

ini_set('display_errors', 'On');
$subject = $_GET['title'];
$desc = $_GET['excerpt'];
$start = $_GET['date'];
$loc = $_GET['loc'];
/**
 * This example shows you the basic was to use the invite feature
 * where you create and download the invite at the sametime.
 * 
 * Look at example2.php for a more advance usage method. 
 */
require "settings.php";
use IcsGenerator\Invite;
$invite = new Invite();
$invite->setSubject("Test Demo Invite")->setDescription("The is a test invite for you to see how this thing actually works")->setStart(new DateTime('2013-03-16 12:00AM EST'))->setEnd(new DateTime('2013-03-16 11:59PM EST'))->setLocation("Queens, New York")->setOrganizer("*****@*****.**", "John Doe")->addAttendee("*****@*****.**", "Ahmad Amin");
$invite->download();
Example #2
0
<?php

/**
 * 
 * Example2: This example shows you how to generate an invite, save it
 * to file and download it at a later time.
 *  
 */
require "settings.php";
use IcsGenerator\Invite;
$invite = new Invite();
$invite->setSummary("Test Demo Invite")->setDescription("The is a test invite for you to see how this thing actually works")->setStart(new DateTime('2012-05-10 01:00PM EDT'))->setEnd(new DateTime('2012-05-10 02:00PM EDT'))->setLocation("Queens, New York")->setOrganizer("*****@*****.**", "John Doe")->addAttendee("*****@*****.**", "Ahmad Amin")->generate()->save();
// save it to a file
// as you may notice this is a static method
// it is indipendent of the object.
$download_link = Invite::getSavedPath();
?>
<a href="<?php 
echo $download_link;
?>
" >Dowload Invite</a>