cleantalk / remote-calls
CleanTalk `RemoteCalls` 家族类的 APBCT
1.6.0
2024-09-13 11:40 UTC
Requires
Requires (Dev)
- phpcompatibility/php-compatibility: ^9.3
- phpunit/phpunit: ^7.5
- squizlabs/php_codesniffer: 3.*
- vimeo/psalm: ^4.8
README
安装
composer require cleantalk/remote-calls
使用
<?php $storage_handler = new \Cleantalk\Custom\StorageHandler\StorageHandler(); $api_key = 'your_api_key'; $remote_calls = new \Cleantalk\Common\RemoteCalls\RemoteCalls($api_key, $storage_handler); if ( $remote_calls::check() ) { try { die $remote_calls->process(); } catch ( \Cleantalk\Common\RemoteCalls\Exceptions\RemoteCallsException $exception ) { // Do logging here die 'FAIL ' . json_encode(array('error' => $exception->getMessage())) } }