On 2016-06-07 10:46 PM, Gus wrote:
> What am I missing in trying to get json output from ical feed:
You're missing quite a bit.
>
> <?php
> use Sabre\VObject;
>
> include 'vendor/autoload.php';
>
> $mycal = array VObject\Node::jsonSerialize('http://theicalfeed.ics');
>
> echo $mycal;
> ?>
Try:
$source = file_get_contents('http://hostname/theicalfee.ics');
$vobj = VObject\Reader::read($source);
$json = json_encode($vobj);
echo $json;
--
You received this message because you are subscribed to the Google Groups
"SabreDAV Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sabredav-discuss/c77dc30a-0840-fa24-edaf-684790d7a6bd%40evertpot.com.
For more options, visit https://groups.google.com/d/optout.