最新のgoogle-api-php-client

まず、コマンドラインでphpのバージョンを確認します。

[vagrant@localhost api]$ php -v
PHP 5.6.27 (cli) (built: Oct 14 2016 14:06:54)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

gitも確認。

[vagrant@localhost api]$ git version
git version 2.2.1

githubにあるリポジトリをローカルにcloneします。

[vagrant@localhost api]$ git clone https://github.com/google/google-api-php-client.git
Cloning into 'google-api-php-client'...
remote: Counting objects: 10177, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 10177 (delta 3), reused 8 (delta 2), pack-reused 10158
Receiving objects: 100% (10177/10177), 6.98 MiB | 1.51 MiB/s, done.
Resolving deltas: 100% (6953/6953), done.
Checking connectivity... done.

入りました。

では、試しに、examplesをサーバーで見てみましょう。

[vagrant@localhost google-api-php-client]$ php -S 192.168.33.10:8000
PHP 5.6.27 Development Server started at Mon Jan 29 16:12:27 2018
Listening on http://192.168.33.10:8000
Document root is /home/vagrant/api/google-api-php-client
Press Ctrl-C to quit.
[Mon Jan 29 16:12:44 2018] 192.168.33.1:59098 [200]: /examples/
[Mon Jan 29 16:12:44 2018] 192.168.33.1:59099 [200]: /examples/styles/style.css
[Mon Jan 29 16:12:44 2018] 192.168.33.1:59101 [404]: /favicon.ico - No such file   or directory
[Mon Jan 29 16:12:47 2018] 192.168.33.1:59100 Invalid request (Unexpected EOF)