2016-02-24 139 views
0

我需要从php发送消息给icq。我正在使用WebIcqPro。通过php发送icq消息

<?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); 
} 

此代码失败,错误:错误:服务器关闭连接

P.S:也许还有其它工作 ICQ类?

回答

1

增加限制。

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

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