关于Google Calendar API和PHP

I am trying to write a webpage that will present to the public the contents of one of my Google Calendars. The standard iframe doesn't give me the format I'd like and I also want to embed some schema.org event information, update and submit a sitemap, etc.

As I'm fairly experienced with PHP, I'm trying to extract data from the Google Calendar API. I looked at Google's quickstart https://developers.google.com/calendar/quickstart/php but it assumes a level of knowledge I don't possess.

It seems I need to use something called "composer" and tells me I need to do "composer require google/apiclient:^2.0" but I'm unclear where exactly I type this - I can't see anywhere obvious in cPanel - or maybe it goes at the start of my PHP code?

Also, I note that the sample code is command-line only and I can't find code anywhere that would appear to be capable of running as a PHP web page. Is that because it's just not possible?

Composer is a dependency manager like bower, npm, yarn etc., the list goes on and on. Firstly you'll have to install composer here and add it to your PATH variable (method depends on OS).

Afterwards, when you create a directory for your project in the www-folder of your WAMP/LAMP or another folder acting as webroot, you can execute the composer require command. This will generate a folder called 'vendor' (with your dependency as a subdirectory) and a composer.json & composer.lock file, the latter 2 files will contain all the 'required dependencies' of composer.

You can then include the dependency using the require_once()-function in your PHP-script.

Hopefully this helps.

Cheers.