I am setting up iCal sync for my client who has a booking site. Since he also works with Booking com, Airbnb, TripAdvisor, he needs iCal synchronization in order to track bookings. To synchronize with these services, a link to a PHP file from its site is used. This file generates a .ics file. There are no problems with Booking com, synchronization works correctly. But Airbnb does not want to automatically sync, only manual syncs are working properly. And TripAdvisor does not want to accept a link to a PHP file at all. Have you faced such a problem and how did you solve it? What can you advise here? Also I post code to PHP file and what the .ics file comes out. Thank you for your help.
PHP file
$currentProperty = getting property id from link;
$writingCalendarFiles = getting information about reservations from database;
$ical = "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID;X-RICAL-TZSOURCE=TZINFO:-//Booking manager//Calendar 1.0//EN\r\nCALSCALE:GREGORIAN\r\n";
while ($writingCalendarFile = $writingCalendarFiles->next()) {
$eventStart = "BEGIN:VEVENT";
$eventDateStart = "DTSTART:" . there is date from database;
$eventDateEnd = "DTEND:" . there is date from database;
$eventCreated = "DTSTAMP:" . there is date from database . "T" . date("His") . "Z";
$eventIdentifier = "UID:" . there is reservation id . "@bookingmanager";
$eventLastModified = "LAST-MODIFIED:" . date("Ymd") . "T" . date("His") . "Z";
$eventSequence = "SEQUENCE:0";
$eventData = there is property name;
$eventDescription = "SUMMARY:" . $eventData;
$eventEnd = "END:VEVENT";
$ical .= $eventStart . "\r\n" . $eventDateStart . "\r\n" . $eventDateEnd . "\r\n" . $eventCreated . "\r\n" . $eventIdentifier . "\r\n". $eventLastModified ."\r\n" . $eventSequence . "\r\n" . $eventDescription . "\r\n" . $eventEnd . "\r\n";
}
$ical .= "END:VCALENDAR";
header('Content-type: text/calendar; charset=utf-8');
header('Content-Disposition: inline; filename=calendar.ics');
echo $ical;
exit;
Ics file
BEGIN:VCALENDAR
VERSION:2.0
PRODID;X-RICAL-TZSOURCE=TZINFO:-//Booking manager//Calendar 1.0//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTART:20200924
DTEND:20200927
DTSTAMP:20200924T155721Z
UID:20200924@bookingmanager
LAST-MODIFIED:20201105T155721Z
SEQUENCE:0
SUMMARY:Apartment name
END:VEVENT
END:VCALENDAR