PHP code example of droath / webmerge

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

    

droath / webmerge example snippets




$config = new \WebMerge\Config(
    '3K83KMN1AL6M1MXMVVCKR66BP9NA', 'I51BBZ5R'
);
$resource = new \WebMerge\Resource($config, '\WebMerge\Resources\Document');


...
$resource = new \WebMerge\Resource($config, '\WebMerge\Resources\Document');

$response = null;
try {
    $response = $resource(123456)->get();
} catch (Exception $e) {
    // error handling
}

$data = $response->extract()->asArray();

var_dump($data);