Thanks so much for this script. I added it and have got it working with IOS and Google Calendars.
Couple of points.
I used www.iCalendar.org
to validate and test the output. As it stands the script generates errors and warnings:
I need to add a line for DTSTAMP in the ajax iCalFeed.php file. After line 40 add:
$output .= sprintf( "DTSTAMP:%s\r\n", date( DATE_ICAL, strtotime( substr( $event['date_created'], 0, 11 ) ) ) );
Also there was a warning on line length. I reduce the line length on 'description' from 75 to 60 to fix this.
Then the script validated ok and I was able to add to Google calendar and to iPhone calendar.
Also I have been contemplating the practice of passing the username and password as free text over the URL for the feed. I set up a read only user to call the feed but even so I am a little concerned. The other approach I guess would be to hard code this information into the script. I think I'll go that route as seems a little more secure. Anyone got any thoughts on this?
Many thanks again for the script!