Ich habe eine Frage, ob jemand so nett wäre.Was ist los mit dieser ICS-Datei?
Nun eigentlich sind es zwei voneinander abhängige Fragen.
Ich mache eine Kalenderdatei, ich bin nicht gewohnt, Dateien zu schreiben, obwohl es einfach scheint, dies in eine TXT-Datei zu schreiben.
Muss ich Header für eine .ics-Datei schreiben und wie geht das, wenn ja?
Was ist falsch daran, das nicht in iCal (MacOS) geöffnet wird?
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTEND: 19700101T024640Z
UID: 5724dce4946da
DTSTAMP:20160430T162716Z
LOCATION:Green Park Station
DESCRIPTION:The Urban Playground Team are the original performance-parkour (2PK) company combining urban & contemporary dance with authentic French Free-Running. The Team have toured their performances and teaching across five continents for clients including the British Council. Since 2006 the team has included co-creator of Parkour Malik Diouf. In 2009 the Team designed and opened the UK’s first permanent parkour site\, and have since launched two more. In 2013 they founded the international performance-parkour network to support the development of 2PK globally. They have appeared on BBC1’s Blue Peter and Sky1’s Got To Dance. <br />
Steam is a touring performance\, in which a group of urban explorers discover\, beneath canvas tarps\, the skeletal remains of a machine that changed the world. Inspired\, they shovel coal on the fires of the past. Engineers and drivers hurry to work at the sounds of a whistle’s blast\, and the passengers begin to dance. Inspired by classic movie genre Steam takes the UPG Team on a whistle stop tour through silent movies\, the Wild West\, James Bond\, WWI and the dark future of inner city commuting…<br />
Try out your own skills after the show - and you could even become part of the next performance!<br />
See also Weds June 1st.
URL;VALUE=URI:http://bathfringe.co.uk/single-event?u_name=Steam
SUMMARY:Steam
DTSTART:19700101T000000Z
END:VEVENT
END:VCALENDAR
die Inhalte werden wie folgt generiert:
$contents =
'BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTEND: '.dateToCal($dateend) .'
UID: '. uniqid() .'
DTSTAMP:'. dateToCal(time()) .'
LOCATION:'. escapeString($address) .'
DESCRIPTION:'. escapeString($description) .'
URL;VALUE=URI:'. escapeString($uri) .'
SUMMARY:'. escapeString($summary) .'
DTSTART:'.dateToCal($datestart) .'
END:VEVENT
END:VCALENDAR '
Nur eine Anmerkung; Ich dachte, es könnte das Datum ungültig sein, da es der 1. Januar 1970 oben ist, aber ich habe das mit 'time()' geändert, und das ist es nicht. –