
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");