More fun with Dynix OPAC, PHP and XML

Peter Rukavina

Remember four years ago when I did some experiments with my local library’s online catalog? While I’ve returned to the project, and have released some updated code that leverages the fact that Dynix, the engine behind the catalog, can output XML for almost everything it does. The result is a PHP class: class.dynix.php.

You can try this out for yourself, if you’re a PEI Provincial Library card holder, by visiting this example page wherein you can enter your public library card number and password and retrieve a nicely formatted list of the items you have checked out and on hold. Here’s what it looks like in action:

Entering OPAC URL, username and password screen shot Nicely formatted list of the items I have checked out and on hold

Note that although I don’t record your library card number and password, they are sent insecurely, and as such are liable to interception by evil doers. Of course this is also true when you use the OPAC directly, albeit with one fewer point of possible evil.

In theory this should work for any Dynix system that has a website: the default URL in the example above is for Prince Edward Island, but if you can find the equivalent URL for your system, just enter it (it might end in ipac.jsp like ours does?).

For maximum fun, go and grab the PHP source code and set yourself up locally: all you need is a standard PHP5 install — there are no other dependencies.

Comments

Submitted by Paul R. Pival on

Permalink

Hey Peter, neat stuff - I’ll try it with my local Dynix system when I find my wallet :-) Have you ever played with Library Elf? Seems to do pretty much the same thing - while PEI isn’t on The List (I just requested it), I know they support Dynix systems.

Submitted by Paul R. Pival on

Permalink

Whoops, my bad, PEI Provincial IS on the list already - I was looking for PEI Public :-/

Submitted by Ryan on

Permalink

Way to go Peter! It’d be neat to development this into typical module for your favorite CMS (eg. Joomla, Drupal, Wordpress). Eg. (What am I borrowing now?)

Although it’d be nice to get some encryption into the class though too.

Submitted by Peter Rukavina on

Permalink

What would be really helpful is some sort of mechanism, similar to the Flickr Authentication API, what would allow a patron to provide access to a given set of personal library data without handing over their library card number and password.

I wonder if such a thing exists for Dynix.

Submitted by Peter Rukavina on

Permalink

To continue the conversation with myself: it seems there is a concept called “Remote Patron Authentication” that comes close to this in concept. Except that the idea with RPA is simply to allow patrons to authenticate against the OPAC and then gain access to third-party data, whereas what I’m looking for is a way to allow patrons to authenticate against the OPAC and then allow my third-party application access to some of their OPAC data.

Oh, and it seems maybe when I say “OPAC” I should be saying “ILS.” At least if I want to be hip to the librarian lingo.

Submitted by Ryan on

Permalink

Just mulling over the code. Couple of things for a coder to consider:

1. Curl support for people on hosted webservers.
2. Possible to retrieve data via XMLReader to save on load time? There’s a lot of extraneous xml in those urls. Not a biggy if you are only grabbing one thing, but if you were to get multiple things from different places (your holds + your kids’ holds), the time savings could be significant.
3. Some encryption help would be nice, of course.

You might want to add a little extra to your comments as well about privacy etc. too. Although you are covered via “no warrantees” there could still be the risk of someone borrowing a book on (eg.) How to divorce your husband and that appearing on a blog/website etc.

I’ll play with it a bit and see what I can add to help out with some of these things.

Submitted by Glenn Peterson on

Permalink

Hennepin County Library offers a limited amount of information from a users account — folks can retrieve their items out and items on hold via RSS. The syntax looks something like:

http://hzapps.hclib.org/pub/ip…

(this is a live test account used for training)

The RandomKey is associated in the ILS database with the user, but only person’s first name and last initial is published in the feed for privacy. Only authenticated users can get access to their key, of course, and choose whether and how to share publicly. We are a Sirsi/Dynix library running Horizon ILS.

Submitted by Patrick on

Permalink

This is something I’m really interested in doing, and I was wondering if you could give me a few pointers. The links to the source code are dead and I’m not having any luck digging up info on the Dynix API. Is there any good documentation for this available?

Thanks for your help,

– Patrick

Submitted by DaveMcL on

Permalink

Peter, I’m really liking what’s going on here. Any chance you would release the source code of the page(s) you use to access your class?

Submitted by Chris on

Permalink

I’m in the same boat with Patrick, if it would be possible to get the source code I’d really appreciate it. Thanks. ~ Chris

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search