4
4
This is a simple web-based example of calling the Google Compute Engine API
5
5
in PHP.
6
6
7
- ## Prerequisites:
7
+ ## Prerequisites
8
8
Please make sure that all of the following is installed before trying to run
9
9
the sample application.
10
10
11
- - PHP 5.2.x or higher [ http://www.php.net/ ]
12
- - PHP Curl extension [ http://www.php.net/manual/en/intro.curl.php ]
13
- - PHP JSON extension [ http://php.net/manual/en/book.json.php ]
14
- - The google-api-php-client library checked out locally
15
- [ https://code.google.com/p/google-api-php-client/ ]
11
+ - [ PHP 5.2.x or higher] ( http://www.php.net/ )
12
+ - [ PHP Curl extension] ( http://www.php.net/manual/en/intro.curl.php )
13
+ - [ PHP JSON extension] ( http://php.net/manual/en/book.json.php )
14
+ - The [ ` google-api-php-client ` ] ( https://github.com/google/google-api-php-client )
15
+ library checked out locally
16
16
17
17
## Setup Authentication
18
18
NOTE: This README assumes that you have enabled access to the Google Compute
@@ -22,7 +22,7 @@ Engine API via the Google API Console page.
22
22
application.
23
23
- Click on "API Access" in the left column
24
24
- Click the button labeled "Create an OAuth2 client ID..." if you have not
25
- generated any client IDs, or "Create another client ID..." if you have
25
+ generated any client IDs, or "Create another client ID..." if you have
26
26
- Give your application a name and click "Next"
27
27
- Select "Web Application" as the "Application type"
28
28
- Click "Create client ID"
@@ -33,12 +33,12 @@ generated any client IDs, or "Create another client ID..." if you have
33
33
34
34
2 ) Update app.php with the redirect uri, consumer key, secret, and Project ID
35
35
obtained in step 1.
36
- - Update ' YOUR_CLIENT_ID' with your oauth2 client id.
37
- - Update ' YOUR_CLIENT_SECRET' with your oauth2 client secret.
38
- - Update ' YOUR_REDIRECT_URI' with the fully qualified
39
- redirect URI.
40
- - Update ' YOUR_GOOGLE_COMPUTE_ENGINE_PROJECT' with your Project ID from the
41
- API Console.
36
+ - Update ` YOUR_CLIENT_ID ` with your oauth2 client id.
37
+ - Update ` YOUR_CLIENT_SECRET ` with your oauth2 client secret.
38
+ - Update ` YOUR_REDIRECT_URI ` with the fully qualified
39
+ redirect URI.
40
+ - Update ` YOUR_GOOGLE_COMPUTE_ENGINE_PROJECT ` with your Project ID from the
41
+ API Console.
42
42
43
43
## Running the Sample Application
44
44
3 ) Load app.php on your web server, and visit the appropriate website in
0 commit comments