Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/04/2004, 08:26
Avatar de Reynier
Reynier
 
Fecha de Ingreso: noviembre-2002
Ubicación: Por ahí en algún sitio
Mensajes: 1.844
Antigüedad: 21 años, 5 meses
Puntos: 1
Nada

ahora lo he puesto así y nada
Código PHP:
<?
 ob_start
();
 require(
"functions.php");
 
nocache();
  if((isset(
$action))&&($action=="singin")){
   include(
'includes/class.jabber.php');
   
$jab = new Jabber();
   
$jab->username $_POST['login'];
   
$jab->password $_POST['password'];
   
$jab->resource "ClassJabberPHP";
   
$jab->enable_logging TRUE;
   
$jab->log_filename 'logs/logjab.log';
   
$jab->Connect() or die("No me he podido conectar la Servidor de Jabber: ".$_POST['server']."");
   
$jab->SendAuth();
   
$jab->SendPresence("available""online");
   if(
$jab->connected){
    echo 
"sdfjsdfjksdhfjksdhfjkasdghfgasdjgfasdgf";
   }else{
    echo 
"efkjsfjkhfdgjkhjdg";
   }
   
$jab->SendMessage("[email protected]""chat"NULL, array("body" => "This is the message text"));
  }
 
ob_end_flush();
?>
el fichero de logs contiene esto:
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='408684AB' xmlns='jabber:client' from='jabber.uci.cu'>

SEND: <iq type='get' id='auth_606ee82ed4d824918740175e7b4c943c'>
<query xmlns='jabber:iq:auth'>
<username>rperezm</username>
</query>
</iq>

RECV: <iq type='result' id='auth_606ee82ed4d824918740175e7b4c943c'>
<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_606ee82ed4d824918740175e7b4c943c'>
<query xmlns='jabber:iq:auth'>
<username>rperezm</username>
<password></password>
<resource>ClassJabberPHP</resource>
</query>
</iq>

RECV: <iq type='error' id='auth_606ee82ed4d824918740175e7b4c943c'>
<query xmlns='jabber:iq:auth'>
<username>rperezm</username>
<password/>
<resource>ClassJabberPHP</resource>
</query>
<error code='401'>Unauthorized</error></iq>

ERROR: _sendauth_plaintext() #1
__________________
Ing. Reynier Pérez Mira