1. Go to this page and download the library: Download rdoepner/cleverreach library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rdoepner / cleverreach example snippets
use rdoepner\CleverReach\ApiManager;
use rdoepner\CleverReach\Http\Guzzle as HttpAdapter;
// Create an HTTP adapter
$httpAdapter = new HttpAdapter();
// Authorize your app by credentials
$response = $httpAdapter->authorize('<CLIENT_ID>', '<CLIENT_SECRET>');
if (isset($response['access_token'])) {
// Persist the access token for later use...
}
use rdoepner\CleverReach\ApiManager;
use rdoepner\CleverReach\Http\Guzzle as HttpAdapter;
// Create an HTTP adapter
$httpAdapter = new HttpAdapter(
[
'access_token' => '<ACCESS_TOKEN>',
]
);
// Create the API manager
$apiManager = new ApiManager($httpAdapter);