PHP5 class to interface with III’s XMLOPAC
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
)













5 Comments so far
Leave a comment
[...] PHP5 class to interface with III’s XMLOPAC [...]
By libdev » PHP5 Class for III XMLOPAC on 11.02.05 5:32 pm | Permalink
Nothing short of awesome. Thanks for this, it will most likely save many people time in creating simple apps and mock-ups. I thought about doing something similar but never got the time and I doubt it would be as usable.
By Eby on 11.02.05 5:35 pm | Permalink
We just migrated our regional system to III and they never mentioned the XMLOPAC. Is that one of their extra features, or can we just have it turned on?
By Chris on 11.18.05 9:14 am | Permalink
Hi! Very nice site! Thanks you very much! 1s5GFUOxPt2fJ
By AGJmvv9RDM on 01.12.07 5:22 am | Permalink
health insurance company in…
classifier ruthless back …
By health insurance company in on 02.11.08 12:27 am | Permalink
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>