III XMLOPAC for PHP5
I’m kind-of working on a proof-of-concept for some social software features with our catalog, but I needed a quick and easy way to grab rudimentary bibliographical record data from the catalog.
The upshot is that I threw together a PHP5 class that’ll take a bib number and return a simple array of data from the bib record. It seems pretty portable so I decided to make it available. Even though it’s pretty basic now, I can easily see the scope of this class growing.
Anyway, here’s how you might use it:
require_once('xmlopac.php'); $opac_server = "my.opac.org"; $bibnum = "123456"; $xmlopac = new xmlopac; $xmlopac->opacserver = $opacserver; $result = $xmlopac->get_opac_data($bibnum); print_r($result);
Hopefully, if all works well, you’ll get something like:
Array
(
[author] => Burns, John, 1968-
[fulltitle] => The urban picnic / by John Burns
[title] => The urban picnic
[pubinfo] => Vancouver : Arsenal Pulp Press, 2004
[desc] => 351 p. : ill. ; 23 cm.
[isbn] => 1551521555
[price] => $21.95
)About this entry
You’re currently reading “III XMLOPAC for PHP5,” an entry on blyberg.net
- Published:
- 11.01.05 / 11pm
- Category:
- Libraries




5 Comments
Jump to comment form | comments rss [?] | trackback uri [?]