cleantalk/remote-calls

CleanTalk APBCT of `RemoteCalls` family classes

Installs: 326

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:cleantalk-apbct-lib

1.6.0 2024-09-13 11:40 UTC

This package is auto-updated.

Last update: 2024-12-13 12:11:45 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()))
    }
}