Ahora lo he puesto como me dijistes:
Código PHP:
<?
ob_start();
require("functions.php");
nocache();
if((isset($action))&&($action=="singin")){
include('includes/class.jabber.php');
$jab = new Jabber();
$jab->username = "rperezm";
$jab->password = "andresalejandro";
$jab->resource = "ClassJabberPHP";
$jab->enable_logging = TRUE;
$jab->log_filename = 'logs/logjabb.log';
$jab->Connect() or die("No me he podido conectar la Servidor de Jabber: ".$_POST['server']."");
$jab->SendAuth() or die("No me he podido autentificar");
$jab->SendPresence("available", "online");
if($jab->connected){
echo "Conectado";
}else{
echo "No conectado";
}
$jab->SendMessage("[email protected]", "chat", NULL, array("body" => "Esto está OK"));
}
ob_end_flush();
?>
y el error que me da es este
Cita: SEND: <?xml version='1.0' encoding='UTF-8' ?>
SEND: <stream:stream to='jabber.uci.cu' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
RECV: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' id='408693B6' xmlns='jabber:client' from='jabber.uci.cu'>
SEND: <iq type='get' id='auth_8bbe1e33582394de24ff1124693503bc'>
<query xmlns='jabber:iq:auth'>
<username>rperezm</username>
</query>
</iq>
RECV: <iq type='result' id='auth_8bbe1e33582394de24ff1124693503bc'>
<query xmlns='jabber:iq:auth'>
<username>rperezm</username>
<password/><digest/><sequence>297</sequence><token>3FC53725</token><resource/></query>
</iq>
ATTENTION: SendAuth() - mhash() is not available; screw 0k and digest method, we need to go with plaintext auth
SEND: <iq type='set' id='auth_8bbe1e33582394de24ff1124693503bc'>
<query xmlns='jabber:iq:auth'>
<username>rperezm</username>
<password>andresalejandro</password>
<resource>ClassJabberPHP</resource>
</query>
</iq>
RECV: <iq type='result' id='auth_8bbe1e33582394de24ff1124693503bc'/>
SEND: <presence to='online' type='available' />
SEND: <message to='
[email protected]' type='chat' id='chat_1074713044'>
<body>Esto está OK</body>
</message>
este es el fichero de log del jabber normal es decir el .exe
Cita: SEND: <?xml version="1.0" encoding="UTF-8"?><stream:stream to="jabber.uci.cu" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
RECV: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' id='403A779A' xmlns='jabber:client' from='jabber.uci.cu'>
SEND: <iq type="set" id="JAJSAuth"><query xmlns="jabber:iq:auth"><username>yromero</username><digest>0eb3dbef359006bc3e08dcbba9c456e2b dd67810</digest><resource>Just another jabber client</resource></query></iq>
RECV: <iq type='result' id='JAJSAuth'/>
SEND: <iq type="set" id="jajc_offline_filter"><query xmlns="jabber:iq:filter"/></iq>
SEND: <iq type="get" to="jabber.uci.cu" id="jajl1"><query xmlns="jabber:iq:browse"/></iq>
SEND: <iq type="get" id="JAJSRoster"><query xmlns="jabber:iq:roster"/></iq>
RECV: <iq type='result' id='jajc_offline_filter' from='
[email protected]/Just another jabber client' to='
[email protected]/Just another jabber client'/>
RECV: <iq type='result' to='
[email protected]/Just another jabber client' id='jajl1' from='jabber.uci.cu'><service xmlns='jabber:iq:browse' type='jabber' jid='jabber.uci.cu' name='Jabber Server'>
<service type='jud' jid='jud.jabber.uci.cu' name='Jabber User Directory'>
<ns>jabber:iq:search</ns>
<ns>jabber:iq:register</ns>
</service>
y las diferencias que veo entre el mio y el otro son estas:
Jabber.exe
SEND: <iq type="set" id="JAJSAuth"><query xmlns="jabber:iq:auth"><username>yromero</username
><digest>0eb3dbef359006bc3e08dcbba9c456e2bdd6781 0</digest>< resource>Just another jabber client</resource></query></iq>
jabber.php
SEND: <iq type='set' id='auth_8bbe1e33582394de24ff1124693503bc'>
<query xmlns='jabber:iq:auth'>
<username>rperezm</username>
<password>andresalejandro</password>
<resource>ClassJabberPHP</resource>
</query>
</iq>
RECV: <iq type='result' id='auth_8bbe1e33582394de24ff1124693503bc'/>
ya he bajado la librería mhash pero la tengo que compilar para windows y no se como hacerlo. Si alguien ya tiene la dll, please que me ayude. La necesito de verás.
Salu2