php - Sync multiple iCalendars (Airbnb, Flipkey, Google Calendar, etc) -
i'm developing website apartments rental. i'm using wordpress hotel theme tweaked instead of "rooms" uses "flats" , booking plug-in. each of flats advertised in airbnb , flipkey.
what need able sync calendars if, instance, books flat in airbnb, flat automatically marked "non available" in both website , flipkey. done using feeds .ics provided both companies. there output feed , input feed both, if paste output in input of other , vice versa, thing works perfectly.
now, need way of centralizing both calendar in 1 system , using system feed inputs of airbnb, flipkey , own booking plugin of wordpress. i've tried with:
php icalendar (it can, google calendar, feeds, doesn't -as far know- provide unified output). services http://www.accommodationcalendar.com input, no output either.
maybe http://www.davical.org/ option, i'm using shared hosting, can't install (as far know) -the reason being shared hosting has mysql , not postgresql.
does have idea of how solve this?
thank you!
after research, found solution:
1) use library: http://kigkonsult.se/icalcreator/
2) ics feeds , merge them , create new ics (create both "import" , "export" folders , give them writing permissions).
require_once('../classes/icalcreator/icalcreator.class.php'); $config2 = array("unique_id" => "kigkonsult2.se", "directory" => "import", ); $vcalendar2 = new vcalendar($config2); $vcalendar2->setconfig("url" , "https://someweb/cal.ics"); $vcalendar2->parse(); $vcalendar2->setconfig("url" , "https://anotherurl/cal2.ics"); $vcalendar2->parse(); $vcalendar2->setconfig("directory", "export"); $vcalendar2->setconfig("filename", "icalmerge3.ics"); $vcalendar2->savecalendar(); echo "done";
3) create cron scheduler run file recurrently. point both airbnb , flipkey url feed created. can use many input ics files want.
Comments
Post a Comment