1. Go to this page and download the library: Download scriptotek/sru-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/ */
scriptotek / sru-client example snippets
use Scriptotek\Sru\Client as SruClient;
$sru = new SruClient('http://bibsys-network.alma.exlibrisgroup.com/view/sru/47BIBSYS_NETWORK', [
'schema' => 'marcxml',
'version' => '1.2',
'user-agent' => 'MyTool/0.1',
]);
$records = $sru->all('alma.title="Hello world"');
foreach ($records as $record) {
echo "Got record " . $record->position . " of " . $records->numberOfRecords() . "\n";
// processRecord($record->data);
}