2016-02-24 138 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);