PHP code example of digicol / dcx-sdk-php

1. Go to this page and download the library: Download digicol/dcx-sdk-php 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/ */

    

digicol / dcx-sdk-php example snippets


    "{
        "digicol/dcx-sdk-php": "^2.0"
    },

$ git clone https://github.com/digicol/dcx-sdk-php.git
$ cd dcx-sdk-php
$ composer install




 
piClient = new \Digicol\DcxSdk\DcxApiClient
(
    'http://example.com/dcx/api/',
    ['username' => 'testuser', 'password' => 'secret'],
    ['http_useragent' => 'MyCustomProject']
);
 
$httpStatusCode = $dcxApiClient->get
(
    'document',
    [
        'q' => ['channel' => ['ch050dcxsystempoolnative']],
        's' => ['fields' => ['_display_title', 'DateCreated']]
    ],
    $documentsData
);
 
echo "Got search results:\n";
var_dump($httpStatusCode);
print_r($documentsData);