PHP code example of zloykolobok / bitrix24

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

    

zloykolobok / bitrix24 example snippets


composer 

$oBitrix = new \Zloykolobok\Bitrix24\Classes\Lead();
$oBitrix->setUrl($url);
$oBitrix->setTimeout($timeout);

$fields = [
    'TITLE' => 'Новый лид',
    'NAME' => 'Роман',
    'LAST_NAME' => 'Николаенков',
    'EMAIL' => ['VALUE' => '[email protected]', 'VALUE_TYPE' => 'WORK'],
];

$res = $oBitrix->leadAdd($fields);

$oBitrix = new \Zloykolobok\Bitrix24\Classes\Lead();
$oBitrix->setUrl($url);
$oBitrix->setTimeout($timeout);
$res = $oBitrix->leadGet($id);