1. Go to this page and download the library: Download net-tools/google-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
net-tools / google-api example snippets
$gclient = new Nettools\GoogleAPI\Clients\Serverside_InlineCredentials(
CLIENT_ID,
CLIENT_SECRET,
array(\Google\Service\Calendar::CALENDAR_READONLY)
);
$response = $cal->events->listEvents('primary');
// or explicitely invoke the underlying service object :
$response = $cal->service->events->listEvents('primary');