PluginProbe
Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar / 2.1.21
Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar v2.1.21
2.1.21 2.1.20 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 trunk 1.1 2.0 2.0.1 2.0.10.2 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.16 2.0.17 2.0.18 2.0.2 2.0.20 2.0.21 2.0.22 All 55 releases
booking-manager / assets / libs / icalendar / examples / parseicalendar.php

parseicalendar.php in Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar 2.1.21, at assets/libs/icalendar/examples/parseicalendar.php

39 lines 752 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Parse iCalendar Example
5 *
6 * Enter an ics filename or URL on the command line,
7 * or leave blank to parse the default file.
8 *
9 */
10
11 require_once("../zapcallib.php");
12
13 $icalfile = count($argv) > 1 ? $argv[1] : "abrahamlincoln.ics";
14 $icalfeed = file_get_contents($icalfile);
15
16 // create the ical object
17 $icalobj = new ZCiCal($icalfeed);
18
19 echo "Number of events found: " . $icalobj->countEvents() . "\n";
20
21 $ecount = 0;
22
23 // read back icalendar data that was just parsed
24 if(isset($icalobj->tree->child))
25 {
26 foreach($icalobj->tree->child as $node)
27 {
28 if($node->getName() == "VEVENT")
29 {
30 $ecount++;
31 echo "Event $ecount:\n";
32 foreach($node->data as $key => $value)
33 {
34 echo " $key: " . $value->getValues() . "\n";
35 }
36 }
37 }
38 }
39