PHP Classes

PHP ICQ not chatting

Recommend this page to a friend!

      PHP ICQ  >  All threads  >  PHP ICQ not chatting  >  (Un) Subscribe thread alerts  
Subject:PHP ICQ not chatting
Summary:Can't sennd messages with PHP ICQ
Messages:3
Author:CoolKoon
Date:2007-01-25 01:48:50
Update:2007-01-25 22:14:15
 

  1. PHP ICQ not chatting   Reply   Report abuse  
Picture of CoolKoon CoolKoon - 2007-01-25 01:48:50
Hi!

I've tried your PHP ICQ package. However I don't seem to be able to send any messages with it. Could you provide some clues that what am I doing wrong?

  2. Re: PHP ICQ not chatting   Reply   Report abuse  
Picture of Viacheslav Viacheslav - 2007-01-25 18:50:51 - In reply to message 1 from CoolKoon
Strange, absolutely recently all worked. The version of the protocol was probably replaced. I shall try with it to understand.

  3. Re: PHP ICQ not chatting   Reply   Report abuse  
Picture of CoolKoon CoolKoon - 2007-01-25 22:14:15 - In reply to message 2 from Viacheslav
Well, the problem has been solved. I think that the problem was that I didn't look up the declarations of the connect() and login() functions, and just copied the example in the beginning of the file. The problem was, that although the example lookes like this:

//Example connect:
$icq = new ICQclient("123456","password");
$icq->connect(); //you may comment it if next operation is login.
$icq->setstatus($icq->const["STATUS_FREE4CHAT"]); //Set status "Free for chat"
$icq->setstatusflags($icq->const["STATUSFLAG_DCDISABLED"],$icq->const["STATUSFLAG_BIRTHDAY"]); //Set status-flags DCDISABLED and BIRTHDAY.
$icq->login();
$icq->message_send("656555","it's working"); // Send message
//Example recieve message:
while ($icq->socket)
{
$icq->listen(); //Fetching packet
if ($icq->ismessage()) //If recieved packet is a message
{
echo "I have message from ".$icq->inLastVar["uin"].": ".$icq->inLastVar["text"]."\n\n";
}
}
//Example get info:
var_dump($icq->getinfo("656555"));

the $icq->connect(); and $icq->login(); calls should look like this:

$icq->connect("icq.server.com","port"); and
$icq->login("UIN","password");