webcalendar icon indicating copy to clipboard operation
webcalendar copied to clipboard

Remote Calendars import webcal:// protocol now work

Open kingwap99 opened this issue 5 years ago • 1 comments

Hi I would like to report another issue here

webcal://p34-calendars.icloud.com/published/2/KBf9YJ1IhVzyeBUPBT9GqKJ5BRuX1Rt4VwyATr0tm8RJfIZyIKrsvoUJnx5kSVvZelQD8P94u3e_73o0-zG80exoOa5Mn-7TWLDKFOTgang

this kind of link cannot be imported into webcalendar according this article

php can only support the protocols as below, webcal . not there

file:// — Accessing local filesystem http:// — Accessing HTTP(s) URLs
ftp:// — Accessing FTP(s) URLs php:// — Accessing various I/O streams zlib:// — Compression Streams data:// — Data (RFC 2397) glob:// — Find pathnames matching pattern phar:// — PHP Archive ssh2:// — Secure Shell 2 rar:// — RAR ogg:// — Audio streams expect:// — Process Interaction Streams

but actually if we revised the url link to head with https:// like https://p34-calendars.icloud.com/published/2/KBf9YJ1IhVzyeBUPBT9GqKJ5BRuX1Rt4VwyATr0tm8RJfIZyIKrsvoUJnx5kSVvZelQD8P94u3e_73o0-zG80exoOa5Mn-7TWLDKFOTgang

then it can be still working

kingwap99 avatar Apr 04 '19 05:04 kingwap99

Hi, I just revised the source code for xcal.php as below

function parse_ical ( $cal_file, $source = 'file' ) { global $errormsg, $tz; $cal_file = str_ireplace('webcal://', 'http://', $cal_file);

it seem works good now.

kingwap99 avatar Apr 04 '19 06:04 kingwap99

THanks for the code change. It's now in the main branch.

craigk5n avatar Sep 27 '23 20:09 craigk5n