PHP code example of flamix / b24-lead

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

    

flamix / b24-lead example snippets


composer 

try {
    //If need change APP use changeSubDomain('wpapp') method
    \Flamix\Bitrix24\Lead::getInstance()->auth('YOUR.BITRIX24.COM', 'YOUR.API.KEY')->send(['FIELDS' => ['name' => 'Roman']]);
} catch (\Exception $e) {
    $e->getMessage();
}

try {
    //If need change APP use changeSubDomain() method
    \Flamix\Bitrix24\Lead::getInstance()->changeSubDomain('leadframework')->auth('YOUR.BITRIX24.COM', 'YOUR.API.KEY')->send(['FIELDS' => ['name' => 'Roman']]);
} catch (\Exception $e) {
    $e->getMessage();
}

\Flamix\Bitrix24\SmartUTM::init();

\Flamix\Bitrix24\Trace::setPage('Your page title');

\Flamix\Bitrix24\Trace::init('Your page title');