[jdev] XMPP client library for PHP?
Yves Goergen
nospam.list at unclassified.de
Tue Jul 24 14:31:34 CDT 2007
Hello,
I have written and am running a public service of the JRU-PHP
application, the Jabber Roster Utility to manage your contact list and
do easy mass-editing in it, re-written in PHP [1].
This was once working just fine, you could enter your JID and the
password, get your roster, edit and save it. But then, servers began to
support TLS encryption, Google Talk even requires it. Also, I have
upgraded my webhosting environment from PHP 4 to PHP 5 and the highly
sophisticated code didn't work anymore. (Remember, PHP 4's days are
counted and PHP 6 is in the making already. I don't say that it's good
to have new, incompatible versions all the time, but as a supporting
library, it should work in common environments to be useful.)
Currently, the project uses the Class.Jabber.PHP [2] library, together
with my patch to support UTF-8 and another unofficial patch to support
PHP 5 and TLS security. This seemed to work for some hosts, but I have
made the strange observation that I could connect to Google Talk from my
development web server running on Windows 2000, but not from my public
web server on Linux. There were some crazy errors in PHP's encryption
functions. Sadly, CJP has been discontinued as far as I know. The
website is currently "recovering from losing a hard drive", that's been
at least a couple of days now. Doesn't seem to come back again.
I have learned about alternatives to CJP: There's a Jabber client
library on code.blitzaffe.com [3]. Its primary advantage over CJP is,
according to the website, that it's event-driven and doesn't wait for a
static time for the server to react upon requests, which makes it faster
and more stable at the same time. I've talked to the current CJP
maintainer and in his lack of time, he agreed that this should be the
successor of CJP. But it fails on PHP 5 and according to the author,
Steve Blinch, PHP 5 support has an undetermined schedule (he said this
in January 2007). No update until today.
A new library was developed for the Flyspray project [4], because they
also couldn't find a usable one. So far it only supports sending
messages, it doesn't have any further capabilities like roster
management, vcards and all the other Jabber stuff. Maybe it will come,
but now it doesn't look so.
So my question is, are there any plans on this planet to create a Jabber
client library for PHP that is working on a current web server platform
and supports the majority of all Jabber servers? Are there any projects
that I have missed?
>From what I've seen in the CJP code and from my first vainly experiences
in creating an XMPP client library in C#, I know that XMPP is a highly
complex XML-based protocol and I admire everybody who could create a
working piece of code to speak that protocol. But both the XML structure
with all its different namespaces that look so glued together from
different things and the way PHP's XML functions are to be used surpass
my capabilities so that I don't see myself able to fill that gap on my own.
I do believe that the Jabber idea is a great thing, I've converted from
ICQ a few years ago and am using my own modified version of Psi since
then, running my own (public) server for some time now. Only the
implementation is a bit complicated and hard to understand. Maybe this
is the reason why there's no good and complete library for PHP? How is
the situation for other languages? I've heard of a Perl module recently,
agsXMPP for .NET seems to develop nicely (I'll get back to it sometime
in the future...) and then there's still the C++ libraries that Psi and
Gaim use. Not a very long list compared to world-leading standards like
SMTP or HTTP - which are still a lot simpler, to be honest.
So these are my thoughts for today. Are there any comments, please?
[1] http://beta.unclassified.de/projekte/jru-php/
[2] http://cjphp.netflint.net/
[3] http://code.blitzaffe.com/pages/phpclasses/files/jabber_client_52-11
[4] http://flyspray.org/class.jabber2.php
--
Yves Goergen "LonelyPixel" <nospam.list at unclassified.de>
Visit my web laboratory at http://beta.unclassified.de
More information about the JDev
mailing list