Quick note as many on-list may find this useful.
I've maintained a PHP class to connect to IOS devices over telnet and
parse the output into something useful for various internal tools for
a few years now. I've recently worked with the author of phpseclib to
create an SSH version of the library.
It's still in a pre-release state until I have time to clean it up,
but I've uploaded an archive of the SSH version and the modified
phpseclib for anyone who needs in the meantime.
You can find it at the bottom of the Cisco for PHP page: