Send icq message via php

627 views Asked by At

I need to send message to icq from php. I`m using WebIcqPro.

<?php

require_once('WebIcqPro.class.php');

$uin = '******';
$pass = '******';
$to_uin = '******';

$icq = new WebIcqPro();
$icq->debug = true;
$icq->setOption('UserAgent', 'miranda');
if ($icq->connect($uin, $pass)) {
    $icq->sendMessage($to_uin, 'Hello! This is a test message');
} else {
    die('ICQ connection error: ' . $icq->error);
}

This code fails with error: Error: Server close connection

P.S.: Maybe there are other working icq classes?

1

There are 1 answers

0
7upzz On BEST ANSWER

increase the limits.

edit file "WebIcqPro.class.php":

// $this->setTimeout(6, 0); 
$this->setTimeout(60, 60000);