PHP code example of nguyenanhung / omnisend

1. Go to this page and download the library: Download nguyenanhung/omnisend 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/ */

    

nguyenanhung / omnisend example snippets



/**
 * Project omnisend
 * Created by PhpStorm
 * User: 713uk13m <[email protected]>
 * Copyright: 713uk13m <[email protected]>
 * Date: 09/09/2021
 * Time: 10:32
 */
 
use nguyenanhung\Omnisend\Services\Omnisend;


    'eventId' => 'xxx'
];
$body   = [
    'email'  => '[email protected]',
    'fields' => 'abc'
];

$result = $omnisend->withPostRequest()->events($body);

echo "<pre>";
print_r($result);
echo "</pre>";