Source code for www.therealhotdogmark.com
The code in index.php
is based on this "PHP quickstart" guide for Google Analytics Reporting API v4.
This website uses the Google Analytics API to track the number of unique visitors. This required me to create a Google Clound Platform project with an associated service account. I then had to add the service account to my Google Analytics account.
Important: For security reasons, the service account credentials have not been committed to source control. Before deploying these files to a web server, you'll need to paste the service account credentials into the service-account-credentials.json
file, then upload this file into a folder above the web root.
- Follow these instructions to install Composer locally, into the project's root directory.
- Run
mv composer.phar composer
to rename the Composer file. - Run
php composer install
to install the project's dependencies. - Run
php -v
and make sure that you have PHP version 7.2.5 or higher installed. The web server that you deploy these files to will also need to be running this version of PHP or higher. - Run
php -S localhost:9000
to start a local PHP development server.
- Run
php composer outdated
to check for available updates. - Run
php composer update
to update the dependencies.