1. Go to this page and download the library: Download pubconnect/isbn-urn 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/ */
pubconnect / isbn-urn example snippets
use Pubconnect\IsbnUrn\IsbnUrn;
$urnParser = new IsbnUrn();
$urnParser->setNamespaceIdentifier('isbn');
$urnParser->setNamespace('9795363916662');
$urnParser->setTocItem('3.3.3');
$urnParser->setOffset(10, 34);
$urnParser->setTextFragment('de lelijke vos sprong in de bosjes');
echo $urnParser->getUrn();
use Pubconnect\IsbnUrn\IsbnUrn;
$urnString = "urn:isbn:9795363916662";
$urnParser = new IsbnUrn($urnString);
$urnParser->setTocItem('4.3.2');
$urnParser->setOffset(0, 340);
$urnParser->setTextFragment('de lelijke vos sprong in de bosjes');
echo $urnParser->getUrn();
echo PHP_EOL.PHP_EOL;