Skip to content

Instantly share code, notes, and snippets.

View nowendwell's full-sized avatar

Ben Miller nowendwell

  • Sacramento, CA
View GitHub Profile
@nowendwell
nowendwell / PHPtoICS.php
Last active December 7, 2016 23:12 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
function make_ics( $summary = 'test', $datestart = 1481328000, $dateend = '', $address = null, $uri = 'http://google.com', $description = 'Here is some body', $filename = 'event.ics' )
{
// Variables used in this script:
// $summary - text title of the event
// $datestart - the starting date (in seconds since unix epoch)
// $dateend - the ending date (in seconds since unix epoch)
// $address - the event's address
// $uri - the URL of the event (add http://)