cleantalk / remote-calls
CleanTalk APBCT of `RemoteCalls` family classes
Installs: 320
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:cleantalk-apbct-lib
Requires
Requires (Dev)
- phpcompatibility/php-compatibility: ^9.3
- phpunit/phpunit: ^7.5
- squizlabs/php_codesniffer: 3.*
- vimeo/psalm: ^4.8
README
Install:
composer require cleantalk/remote-calls
Using:
<?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())) } }