google / cloud-recaptcha-enterprise
Google Cloud Recaptcha Enterprise Client for PHP
Requires
- php: ^8.0
- google/gax: ^1.34.0
Requires (Dev)
- phpunit/phpunit: ^9.0
Suggests
- ext-grpc: Enables use of gRPC, a universal high-performance RPC framework created by Google.
- ext-protobuf: Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions.
- dev-main
- v1.15.0
- v1.14.0
- v1.13.0
- v1.12.2
- v1.12.1
- v1.12.0
- v1.11.1
- v1.11.0
- v1.10.0
- v1.9.1
- v1.9.0
- v1.8.2
- v1.8.1
- v1.8.0
- v1.7.0
- v1.6.0
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.6
- v1.2.5
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.2.1
- v0.2.0
- v0.1.2
- v0.1.1
- v0.1.0
This package is auto-updated.
Last update: 2024-10-31 00:22:06 UTC
README
Idiomatic PHP client for Google Cloud Recaptcha Enterprise.
NOTE: This repository is part of Google Cloud PHP. Any support requests, bug reports, or development contributions should be directed to that project.
Installation
To begin, install the preferred dependency manager for PHP, Composer.
Now install this component:
$ composer require google/cloud-recaptcha-enterprise
This component supports both REST over HTTP/1.1 and gRPC. In order to take advantage of the benefits offered by gRPC (such as streaming methods) please see our gRPC installation guide.
Authentication
Please see our Authentication guide for more information on authenticating your client. Once authenticated, you'll be ready to start making requests.
Sample
require 'vendor/autoload.php'; use Google\Cloud\RecaptchaEnterprise\V1\Key; use Google\Cloud\RecaptchaEnterprise\V1\RecaptchaEnterpriseServiceClient; use Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings; use Google\Cloud\RecaptchaEnterprise\V1\WebKeySettings\IntegrationType; $client = new RecaptchaEnterpriseServiceClient(); $project = RecaptchaEnterpriseServiceClient::projectName('[MY_PROJECT_ID]'); $webKeySettings = (new WebKeySettings()) ->setAllowedDomains(['example.com']) ->setAllowAmpTraffic(false) ->setIntegrationType(IntegrationType::CHECKBOX); $key = (new Key()) ->setWebSettings($webKeySettings) ->setDisplayName('my sample key') ->setName('my_key'); $response = $client->createKey($project, $key); printf('Created key: %s' . PHP_EOL, $response->getName());
Version
This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority.
Next Steps
- Understand the official documentation.