Best XMPP Client PHP/Javascript
It seems jaxl support bosh. Then I would look into strophe.js. I myself don't have hands on experience, but if I would implement this in PHP I would try to do it like this.
hxmpp is written in Haxe and supports JavaScript and PHP. so you can use (a part) of your code on both platforms.