@@ -28,21 +28,49 @@ Vision API from PHP.
28285 . For a basic demonstration of the Cloud Vision API, run ` php quickstart.php ` .
29296 . Run ` php vision.php ` . The following commands are available:
3030```
31- face Detect faces in an image using Google Cloud Vision API
32- help Displays help for a command
33- label Detect labels in an image using Google Cloud Vision API
34- landmark Detect landmarks in an image using Google Cloud Vision API
35- list Lists commands
36- logo Detect logos in an image using Google Cloud Vision API
37- property Detect image proerties in an image using Google Cloud Vision API
38- safe-search Detect adult content in an image using Google Cloud Vision API
39- text Detect text in an image using Google Cloud Vision API
40- crop-hints Detect crop hints in an image using Google Cloud Vision API
41- document-text Detect document text in an image using Google Cloud Vision API
42- web Detect web entities in an image using Google Cloud Vision API
31+ face Detect faces in an image using Google Cloud Vision API
32+ help Displays help for a command
33+ label Detect labels in an image using Google Cloud Vision API
34+ landmark Detect landmarks in an image using Google Cloud Vision API
35+ list Lists commands
36+ logo Detect logos in an image using Google Cloud Vision API
37+ property Detect image proerties in an image using Google Cloud Vision API
38+ safe-search Detect adult content in an image using Google Cloud Vision API
39+ text Detect text in an image using Google Cloud Vision API
40+ crop-hints Detect crop hints in an image using Google Cloud Vision API
41+ document-text Detect document text in an image using Google Cloud Vision API
42+ web Detect web entities in an image using Google Cloud Vision API
43+ web-geo Detect web entities in an image with geo metadata using
44+ Google Cloud Vision API
4345```
44467 . Run ` php vision.php COMMAND --help ` to print information about the usage of each command.
4547
48+ ## The client library
49+
50+ This sample uses the [ Google Cloud Client Library for PHP] [ google-cloud-php ] .
51+ You can read the documentation for more details on API usage and use GitHub
52+ to [ browse the source] [ google-cloud-php-source ] and [ report issues] [ google-cloud-php-issues ] .
53+
54+ ## Troubleshooting
55+
56+ If you get the following error, set the environment variable ` GCLOUD_PROJECT ` to your project ID:
57+
58+ ```
59+ [Google\Cloud\Core\Exception\GoogleException]
60+ No project ID was provided, and we were unable to detect a default project ID.
61+ ```
62+
63+ If you have not set a timezone you may get an error from php. This can be resolved by:
64+
65+ 1 . Finding where the php.ini is stored by running ` php -i | grep 'Configuration File' `
66+ 1 . Finding out your timezone from the list on this page: http://php.net/manual/en/timezones.php
67+ 1 . Editing the php.ini file (or creating one if it doesn't exist)
68+ 1 . Adding the timezone to the php.ini file e.g., adding the following line: ` date.timezone = "America/Los_Angeles" `
69+
70+ [ google-cloud-php ] : https://googlecloudplatform.github.io/google-cloud-php
71+ [ google-cloud-php-source ] : https://github.com/GoogleCloudPlatform/google-cloud-php
72+ [ google-cloud-php-issues ] : https://github.com/GoogleCloudPlatform/google-cloud-php/issues
73+
4674## Contributing changes
4775
4876* See [ CONTRIBUTING.md] ( ../../CONTRIBUTING.md )
0 commit comments