1. Go to this page and download the library: Download bcdh/exist-db-rest-client 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/ */
bcdh / exist-db-rest-client example snippets
use BCDH\ExistDbRestClient\ExistDbRestClient;
$q = 'for $cd in /CD[./ARTIST=$artist] return $cd';
$connection = new ExistDbRestClient();
$query = $connection->prepareQuery();
$query->bindVariable('artist', 'Bonnie Tyler');
$query->setCollection("CDCatalog");
$query->setQuery($q);
$result = $query->get();
$document = $result->getDocument();