3 ############################################################################### 5 ############################################################################### 8 header(
'Content-Type: text/plain');
9 $DOM->preserveWhiteSpace =
false;
10 $DOM->formatOutput =
true;
11 print $DOM->saveXML();
15 $frag = $DOM->createDocumentFragment();
16 $frag->appendXML($xmlString);
21 $DOM = $elt->ownerDocument;
23 $elt->appendChild( $frag );
27 while( $elt->hasChildNodes() )
28 $elt->removeChild( $elt->lastChild );
33 echo
"Are you sure you want to do this? Type 'yes' to continue: ";
34 $handle = fopen (
"php://stdin",
"r");
35 $line = fgets($handle);
36 if(trim($line) !=
'yes'){
42 echo
"Thank you, continuing...\n";
46 if(!headers_sent()) header(
"Location: $url");
47 $url_html = htmlspecialchars($url);
48 echo
"<!DOCTYPE html><html><head><title>Redirect</title><meta http-equiv=refresh content='1; url=$url'></head><body><a href='$url_html'>Go here: $url_html</a></body></html>\n";
52 ############################################################################### 54 ############################################################################### 57 require_once(
"grima-config.php");
58 $url = $hostname .
'/almaws/v1/bibs/{mms_id}';
60 $templateParamNames = array(
'{mms_id}');
61 $templateParamValues = array(urlencode($mms_id));
62 $url = str_replace($templateParamNames, $templateParamValues, $url);
63 $queryParams =
'?view=full&expand=None&apikey=' . urlencode($apikey);
64 curl_setopt($ch, CURLOPT_URL, $url . $queryParams);
65 curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
66 curl_setopt($ch, CURLOPT_HEADER, FALSE);
67 curl_setopt($ch, CURLOPT_CUSTOMREQUEST,
'GET');
68 $response = curl_exec($ch);
74 require_once(
"grima-config.php");
75 $url = $hostname .
'/almaws/v1/bibs/{mms_id}/holdings/{holding_id}';
77 $templateParamNames = array(
'{mms_id}',
'{holding_id}');
78 $templateParamValues = array(urlencode($mms_id,$holding_id));
79 $url = str_replace($templateParamNames, $templateParamValues, $url);
80 $queryParams =
'?view=full&expand=None&apikey=' . urlencode($apikey);
81 curl_setopt($ch, CURLOPT_URL, $url . $queryParams);
82 curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
83 curl_setopt($ch, CURLOPT_HEADER, FALSE);
84 curl_setopt($ch, CURLOPT_CUSTOMREQUEST,
'GET');
85 $response = curl_exec($ch);
115 return preg_replace(
'~[/\\\\]+~', DIRECTORY_SEPARATOR, implode(DIRECTORY_SEPARATOR, $paths));
appendInnerXML( $elt, $xmlString)
setInnerXML( $elt, $xmlString)
importXML( $DOM, $xmlString)
mfhd_get($mms_id, $holding_id)