[英]Send icq message via php
I need to send message to icq from php. 我需要从php向icq发送消息。 I`m using WebIcqPro. 我正在使用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 此代码失败,并显示以下错误:错误:服务器关闭连接
PS: Maybe there are other working icq classes? PS:也许还有其他工作中的 icq课程?
increase the limits. 增加限制。
edit file "WebIcqPro.class.php": 编辑文件“ WebIcqPro.class.php”:
// $this->setTimeout(6, 0);
$this->setTimeout(60, 60000);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.