PHP code example of userscape / customerio
1. Go to this page and download the library: Download userscape/customerio 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/ */
userscape / customerio example snippets
$api = new Customerio\Api($siteId, $apiSecret, new Customerio\Request);
$response = $api->createCustomer(
'someid001',
'[email protected]',
array('arbitrary-data' => 'foobarbaz')
);
if ($response->success()) {
// Continue on with life
} else {
// Learn from your mistakes
echo $response->message();
}