cleantalk/remote-calls

CleanTalk APBCT of `RemoteCalls` family classes

Installs: 224

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:cleantalk-apbct-lib

1.5.0 2023-10-25 16:30 UTC

This package is auto-updated.

Last update: 2024-04-30 08:21:51 UTC


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()))
    }
}