PHP code example of wondeotec / emailbidding-sdk-legacy
1. Go to this page and download the library: Download wondeotec/emailbidding-sdk-legacy 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/ */
wondeotec / emailbidding-sdk-legacy example snippets
(...)
use EB\SDK\Webhook\PayloadFactory;
use EB\SDK\Webhook\Webhook;
(...)
$webhook = new Webhook();
$success = $webhook->post(
PayloadFactory::createOpen('[email protected]', 'my_list'),
'https://your.secure.server/endpoint'
));
(...)
use EB\SDK\RecipientSubscribe\RecipientSubscribe;
use EB\SDK\RecipientSubscribe\RecipientFactory;
(...)
// ** RECIPIENT SUBSCRIBE ** //
// Creating a recipient subscribe object with my credentials
$recipientSubscribe = new RecipientSubscribe('YOUR_PUBLISHER_API_KEY', 'YOUR_PUBLISHER_API_SECRET');
// Posting an simple recipient (minimal information) to Emailbidding API and dumping the result
var_dump($recipientSubscribe->post(
array(RecipientFactory::createSimpleRecipient('[email protected]', 'FR')),
YOUR_PUBLISHER_ID,
'my_best_database'
));
// Posting an anonymous recipient to Emailbidding (NOTE: the email address WILL NOT be sent to Emailbidding)
// The email address '[email protected]' will be transformed in '7328fddefd53de471baeb6e2b764f78a'
var_dump($recipientSubscribe->post(
array(RecipientFactory::createSimpleAnonymousRecipient('[email protected]', 'FR')),
YOUR_PUBLISHER_ID,
'my_best_database'
));
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.