[jdev] PHP jabber class
Nayana Hettiarachchi - GMI
nayana at gmi-mr.com
Sat Jun 11 16:28:29 CDT 2005
I finally found the answer :-) what i am missing here is that i need to
request for the Roster from the server, if i dont request it then the
server doesnt send me the pending requests or non of the new ones while
its online.
Anyways i thought'd i'd send this out so incase if anyone else had this
questions again
Regards thanks for all your help
Nayana
Nayana Hettiarachchi - GMI wrote:
> Mathew,
>
> Yes i am running my php script on command line with a while loop, and i
> even add some debug on the CJP_Connect to check all the incomming
> messages from the server, so far with no luck i dont see it sending the
> "presence" request from other users who try to add the client to their
> list.
>
> I also tried doing a simple telnet to the jabber server and pass the xml
> stuff directly as follows ( this is exactly same as what the PHP class
> generates, i dont see any message comming from the server regarding
> waiting authentication stuff, so what am i missing here ?
>
> I ran another script written in perl which uses Net::Jabber and i can
> see the authentication requets are comming in, i am going to try to
> check the outbound messgaes goes out from the Perl Modules to see if i
> am missing something some where, but if anyone can spot something let me
> know.. thanks
>
> Nayana
>
>
> (1)
> <?xml version='1.0' encoding='UTF-8' ?>
> <stream:stream to='xxx.xxx.com' xmlns='jabber:client'
> xmlns:stream='http://etherx.jabber.org/streams'>
>
> (2)
> <iq type='get' id='auth_edb914d6aca55beb13cfa790d652bf35'>
> <query xmlns='jabber:iq:auth'>
> <username>hb</username>
> </query>
> </iq>
>
> (response)
> <iq type='result' id='auth_edb914d6aca55beb13cfa790d652bf35'>
> <query xmlns='jabber:iq:auth'>
> <username>hb</username>
> <password/><digest/><sequence>486</sequence><token>42A5D2DF</token><resource/></query>
>
> </iq>
>
> (3)
> <iq type='set' id='auth_edb914d6aca55beb13cfa790d652bf35'>
> <query xmlns='jabber:iq:auth'>
> <username>hb</username>
> <password>hhhhhh</password>
> <resource>TipicIM</resource>
> </query>
> </iq>
>
> (response)
> <iq type='result' id='auth_edb914d6aca55beb13cfa790d652bf35'/>
>
> (4)
> <presence>
> <status>online</status>
> </presence>
>
> (5)
> <iq type='get' from='hb at xxx.xxx.com/TipicIM' to='xxx.xxx.com'
> id='keep_alive_1118517698'>
> <query xmlns='jabber:iq:time' />
> </iq>
>
> (response)
> <iq type='result' from='xxx.xxx.com to='hb at xxx.xxx.comTipicIM'
> id='keep_alive_1118517698'>
> <query
> xmlns='jabber:iq:time'><utc>20050611T19:24:48</utc><display>Sat Jun 11
> 19:24:48 2005</display><tz>GMT</tz>
> </query>
> </iq>
>
>
> Matthew Terenzio wrote:
>
>> Not sure I understand the problem, but just want to make clear that
>> you understand that once an HTTP page connection is closed after the
>> the PHP script runs, that your connection with the server will be closed.
>>
>> I use the class with a command line PHP script that acts as the client
>> and loops, waiting for any new incoming messages.
>>
>> Something like this:
>>
>> require("class.jabber.php");
>> $JABBER = new Jabber;
>> $JABBER->server = "Your Server";
>> $JABBER->port = "5222";
>> $JABBER->username = "jabberuser";
>> $JABBER->password = "secret";
>> $JABBER->resource = "";
>> $JABBER->enable_logging = FALSE;
>> $JABBER->Connect() or die("Couldn't connect!");
>> $JABBER->SendAuth() or die("Couldn't authenticate!");
>>
>> while(true) {
>> $JABBER->CruiseControl();
>> }
>>
>> This may not help very much. It's not exactly what I use, but mine is
>> so customized for a certain purpose that it wouldn't be useful to
>> include the exact code.
>> There used to be a command line PHP client called jclient, but I can't
>> seem to find it anymore. Does anyone have a copy of it?
>> On Jun 11, 2005, at 1:46 PM, Nayana Hettiarachchi - GMI wrote:
>>
>>> Hi,
>>>
>>> Has anyone used the PHP jabber class, everything works great in it
>>> except that i am not seeing the server sending the request for
>>> authentication to the client, i tried to debug this by checking all
>>> the messages that comes from the server but i am not seeing any
>>> message comes through when u try to add the php client to another
>>> client`s user list,
>>>
>>> anyone had a similar issue ? any work arounds ? can the
>>> authentication requirment be turned off on a user basis ?
>>>
>>>
>>> Nayana
>>>
>>> --
>>> Nayana Hettiarachchi <nayana at gmi-mr.com>
>>> Associate Director - IT Development
>>> GMI (Global Market Insite, Inc.)
>>> Direct: +1-206-315-9319
>>> Cell: +1-206-713-5759
>>>
>>> Integrated Solutions for Market Research
>>> www.gmi-mr.com
>>>
>>>
>>> _______________________________________________
>>> jdev mailing list
>>> jdev at jabber.org
>>> http://mail.jabber.org/mailman/listinfo/jdev
>>>
>>>
>>
>>
>> _______________________________________________
>> jdev mailing list
>> jdev at jabber.org
>> http://mail.jabber.org/mailman/listinfo/jdev
>>
>>
>>
>>
>>
>
>
--
Nayana Hettiarachchi <nayana at gmi-mr.com>
Associate Director - IT Development
GMI (Global Market Insite, Inc.)
Direct: +1-206-315-9319
Cell: +1-206-713-5759
Integrated Solutions for Market Research
www.gmi-mr.com
More information about the JDev
mailing list