u01jmg3 / ics-parser

Parser for iCalendar Events • PHP 8+, 7 (≥ 7.4), 5 (≥ 5.6)
MIT License
453 stars 145 forks source link

Not parsing the remote "basic.ics" URL, but only the correspondent downloaded file #322

Closed teo2600 closed 1 year ago

teo2600 commented 1 year ago

PHP Version

8.2

PHP date.timezone

Europe/Rome

ICS Parser Version

3.2.1

Operating System

Linux

Description

I am not able to have it working using my private ics calendar URL (https://calendar.google.com/calendar/ical/XXX/XXX/basic.ics) instead of the downloaded file (basic.ics).

When I use the downloaded file it is retrieving the events, but when I use the link to the same file it retrieves nothing...

Steps to Reproduce

BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:PUBLISH X-WR-CALNAME:PhD38it X-WR-TIMEZONE:Europe/Rome BEGIN:VEVENT DTSTART:20230509T070000Z DTEND:20230509T080000Z DTSTAMP:20230503T194722Z UID:XXX@google.com CREATED:20230503T144541Z DESCRIPTION: LAST-MODIFIED:20230503T150822Z LOCATION: SEQUENCE:2 STATUS:CONFIRMED SUMMARY:Prova TRANSP:OPAQUE END:VEVENT END:VCALENDAR

s0600204 commented 1 year ago

Any errors in your web server's logs?

How are you acquiring the calendar from Google? If the calendar is not set to public then you will need to authenticate, possibly by passing a username and password:

use ICal\ICal;
$ical = new ICal();
$ical->initUrl($url, $username, $password);

Presuming duplicate/continuation of #321

u01jmg3 commented 1 year ago

Without more info, there's not a lot for us to go on.