PHP code example of ph-7 / dating-affiliate-tools

1. Go to this page and download the library: Download ph-7/dating-affiliate-tools 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/ */

    

ph-7 / dating-affiliate-tools example snippets


use DAT\Service\Identifier\Affiliate as AffiliateId;
use DAT\Service\Provider\TAC\EveFlirt;
use DAT\Tool\Client\Registration;

if (!empty($_POST['register_to_partner'])) {
    // if user consented it
    $aData = [
        // user data to send to the affiliate platform
    ];

    $oAffiliateId = new AffiliateId('<YOUR_AFFILIATE_ID>');
    $oEveFlirt = new EveFlirt($oAffiliateId);

    $oRegister = new Registration($oEveFlirt, $aData);
    $oRegister->random(); // Optional. Sets the registration niche random
    $oRegister->send();
}