Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/04/2004, 07:13
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
Mira ...

Mira aquí tienen la implementación de SendMessage
Código PHP:
function SendMessage($to$type "normal"$id NULL$content NULL$payload NULL)
    {
        if (
$to && is_array($content))
        {
            if (!
$id)
            {
                
$id $type "_" time();
            }

            
$content $this->_array_htmlspecialchars($content);

            
$xml "<message to='$to' type='$type' id='$id'>\n";

            if (
$content['subject'])
            {
                
$xml .= "<subject>" $content['subject'] . "</subject>\n";
            }

            if (
$content['thread'])
            {
                
$xml .= "<thread>" $content['thread'] . "</thread>\n";
            }

            
$xml .= "<body>" $content['body'] . "</body>\n";
            
$xml .= $payload;
            
$xml .= "</message>\n";


            if (
$this->SendPacket($xml))
            {
                return 
TRUE;
            }
            else
            {
                
$this->AddToLog("ERROR: SendMessage() #1");
                return 
FALSE;
            }
        }
        else
        {
            
$this->AddToLog("ERROR: SendMessage() #2");
            return 
FALSE;
        }
    } 
Salu2
__________________
Ing. Reynier Pérez Mira