/** * Retrieve a Buchhandel cover. * * @return bool True if image displayed, false otherwise. */ function buchhandel() { global $configArray; global $logger; // convert normalized 10 char isn to 13 digits $isn = $_GET['isn']; //$logger->log("isn: " . $isn, PEAR_LOG_DEBUG); if (strlen($isn) != 13) { $ISBN = new ISBN($isn); //$logger->log("ISBN: " . print_r($ISBN,1), PEAR_LOG_DEBUG); $isn = $ISBN->get13(); } //$logger->log("isn: " . $isn, PEAR_LOG_DEBUG); // Convert internal size value to openlibrary equivalent: switch ($_GET['size']) { case 'large': $size = 'L'; break; case 'medium': $size = 'M'; break; case 'small': default: $size = 'S'; break; } $url = isset($configArray['buchhandel']['url']) ? $configArray['buchhandel']['url'] : 'http://vlb.de'; $url .= "/GetBlob.aspx?strIsbn=" . $isn . "&size=" . $size; //$logger->log("Buchhandel URL: ". print_r($url,1), PEAR_LOG_DEBUG); return processImageURL($url, true, 'BH'); }
/** * Retrieve a National Library of Finland cover. * * @return bool True if image displayed, false otherwise. */ function nlf() { $url = 'http://siilo-kk.lib.helsinki.fi/getImage.php?query=' . $_GET['isn'] . '&return_error=true'; return processImageURL($url); }