Hi everyone,
In a project I am working on, the goal is to read an iCal file from another server using an URL. Previously I was using file_get_contents() to do this, but that was back when the file was just on the same computer I'm working on.
Now I am trying to read the iCal file from another server and I'm using stream_get_contents() to do that. It reads the file and everything is okay, but when I parse the file, there are a lot of Warnings/Notices and it has to do with line breaks. Previously the linebreaks that I was using to help break down and parse this file was \r\n. That worked when the file was coming from my own UNIX-based computer. But when I use stream_get_contents(), what happens to the linebreaks? What type of linebreaks are there in a stream_get_contents()-returned string?
Does anyone know? I've tried a few different linebreaks to see if it would fix the problem, but I can't figure out what linebreaks are returned in the string. Thanks,
Andy
PS: Here is an example of what the iCal file looks like:
BEGIN:VEVENT
LOCATION:No School K-12
DTSTAMP:20060307T212128Z
UID:BC03D9B5-86D7-48CD-8B83-C54C64A13479-4DDA79F2-DE1A-40FD-86A7-BA879BF
EE990
SEQUENCE:6
DTSTART;VALUE=DATE:20070115
SUMMARY:Non-Contract Day
DTEND;VALUE=DATE:20070116
DESCRIPTION:Martin Luther King Day
END:VEVENT