google / cloud-recaptcha-enterprise
Google Cloud Recaptcha Enterprise PHP客户端
v1.15.0
2024-08-30 22:10 UTC
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-08-31 03:58:56 UTC
README
这是Google Cloud Recaptcha Enterprise的PHP语言的惯用客户端,[链接](https://cloud.google.com/recaptcha-enterprise)。
注意: 此存储库是Google Cloud PHP的一部分。任何支持请求、错误报告或开发贡献应直接提交给该项目。
安装
首先,安装PHP的首选依赖管理器Composer。
现在安装此组件
$ composer require google/cloud-recaptcha-enterprise
此组件支持HTTP/1.1上的REST和gRPC。要利用gRPC(例如流方法)提供的优势,请参阅我们的gRPC安装指南。
身份验证
有关如何对客户端进行身份验证的更多信息,请参阅我们的身份验证指南。一旦完成身份验证,您就可以开始进行请求。
示例
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());
版本
此组件被认为是GA(普遍可用)。因此,它不会在任何次要或修补版本中引入不兼容的更改。我们将优先处理问题和请求。
下一步
- 了解官方文档。