How to install Google APIs Client Library for PHP


Step 1: install Composer

Step 2: change dir to your project root, then use this command:

composer require google/apiclient:^1.1.7

Note: depend on the version you need.

composer google api client

Example:

C:\Users\Administrator>D:

D:\>cd D:\AppServ\www\adrive

D:\AppServ\www\adrive>composer require google/apiclient:^1.1.7
Your version of PHP, 5.4.0, is affected by CVE-2013-6420 and cannot safely perfo
rm certificate validation, we strongly suggest you upgrade.
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing google/apiclient (1.1.7)
    Downloading: 100%

Writing lock file
Generating autoload files

Done. Now, you see in your project root, there are 2 files composer.json, composer.lock and 1 folder vendor:

composer google api client 2

Leave a Reply