You need to READ or WRITE ?
for read I used in the past :
and
http://sourceforge.net/projects/phpicalendar/ --< i believe this one can also read but it is huge - you might just take a function or two from there
but - I understood by your question that you need to read - iCalender IS plain text .
You only need to open the file and plot line by line.
$data = file_get_contents("myfile.ics"); //read the file
$convert = explode("\n", $data); //create array separate by new line
for ($i=0;$i
{
echo $convert[$i].', '; //write value by index
}
?>
and then use regex or something else to give human-readeble format to the tags ..
EDIT I :
I just found a function I used before :
It uses this class : http://www.kigkonsult.se/iCalcreator/index.php
It was not written by me , but it worked for me in the past .
I do not remember the source for this function - If I will find it i will post ..
require_once 'iCalcreator/iCalcreator.class.php';
$filename = 'D:\Document\Docs\2007\05\iCal-20070508-082112.ics';
$v = new vcalendar(); // initiate new CALENDAR
$v->parse($filename);
# get first vevent
$comp = $v->getComponent("VEVENT");
#print_r($comp);
$summary_array = $comp->getProperty("summary", 1, TRUE);
echo "summary: ", $summary_array["value"], "\n";
$dtstart_array = $comp->getProperty("dtstart", 1, TRUE);
$dtstart = $dtstart_array["value"];
$startDate = "{$dtstart["year"]}-{$dtstart["month"]}-{$dtstart["day"]}";
$startTime = "{$dtstart["hour"]}:{$dtstart["min"]}:{$dtstart["sec"]}";
$dtend_array = $comp->getProperty("dtend", 1, TRUE);
$dtend = $dtend_array["value"];
$endDate = "{$dtend["year"]}-{$dtend["month"]}-{$dtend["day"]}";
$endTime = "{$dtend["hour"]}:{$dtend["min"]}:{$dtend["sec"]}";
echo "start: ", $startDate,"T",$startTime, "\n";
echo "end: ", $endDate,"T",$endTime, "\n";
?>