0

我需要从 php 向 icq 发送消息。我正在使用 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);
}

此代码失败并出现错误:错误:服务器关闭连接

PS:也许还有其他工作的icq 课程?

4

1 回答 1

2

增加限制。

编辑文件“WebIcqPro.class.php”:

// $this->setTimeout(6, 0); 
$this->setTimeout(60, 60000);
于 2016-03-03T05:43:22.193 回答