导航:首页 > 源码编译 > 疾风qq机器人源码

疾风qq机器人源码

发布时间:2024-02-27 18:08:22

‘壹’ QQ机器人怎么制作

在网络中搜索【QQ机器人】,从搜索链接中找到一个合适的机器人软件点击进入对应的下载地址。

在下载地址中挑选合适的版本下载,作为新手,一般下载普通的完整包就可以了。

下载后解压缩到本地,在解压后的文件夹中找到执行文件,双击打开。

1920年,捷克作家卡雷尔·凯佩克(Karel Capek)发表了科幻剧本《罗萨姆的万能机器人》。在剧本中,凯佩克把捷克语“Robota”写成了“Robot”,“Robota”是奴隶的意思。该剧预告了机器人的发展对人类社会的悲剧性影响。

引起了人们的广泛关注,被当成了“机器人”一词的起源。在该剧中,机器人按照其主人的命令默默地工作,没有感觉和感情,以呆板的方式从事繁重的劳动。后来,罗萨姆公司取得了成功,使机器人具有了感情,导致机器人的应用部门迅速增加。



相关介绍:

1920年,捷克作家卡雷尔·凯佩克(Karel Capek)发表了科幻剧本《罗萨姆的万能机器人》。在剧本中,凯佩克把捷克语“Robota”写成了“Robot”,“Robota”是奴隶的意思。该剧预告了机器人的发展对人类社会的悲剧性影响。

引起了人们的广泛关注,被当成了“机器人”一词的起源。在该剧中,机器人按照其主人的命令默默地工作,没有感觉和感情,以呆板的方式从事繁重的劳动。后来,罗萨姆公司取得了成功,使机器人具有了感情,导致机器人的应用部门迅速增加。

‘贰’ qq聊天机器人的原理

QQ聊天机器人(QQ chatterbot)是一个用来模拟人类对话或聊天的程序。“Eliza”和 “Parry”是早期非常着名的聊天机器人。它试图建立这样的程序:至少暂时性地让一个真正的人类认为他们正在和另一个人聊天。
qq聊天机器人的php原理
<?php

include"http_no_cookie.class.php";

classqq {

public$sid;
public$http;
public$qq_num;

function__construct() {
$this->http =newhttp_no_cookie;
}

functionlogin($qq_num,$qq_pwd) {
echo $data=$this->http->get("http://pt.3g.qq.com/");
$action= preg_match("/action=\"(.+)?\"/",$data,$matches);
$action=$matches[1];
$params=array();
$params["login_url"] ="http://pt.3g.qq.com/s?aid=nLogin";
$params["sidtype"] = 1;
$params["loginTitle"] ="手机腾讯网";
$params["bid"] = 0;
$params["qq"] =$qq_num;
$params["pwd"] =$qq_pwd;
$params["loginType"] =1;
echo$data=$this->http->post($action, http_build_query($params));
if(preg_match("/http:\/\/vc.gtimg.com\//",$data,$matches)){
echo"需要输入验证码";
return0;
exit;
}

if(preg_match("/密码错误/",$data,$matches)){
echo"密码错误";
return1;
exit;
}
$action= preg_match("/sid=(.+?)&/",$data,$matches);
$this->sid =$matches[1];
return$this->sid;
}

functionsendMsg($to_num,$msg,$sid= 0) {
$sid=$sid?$sid:$this->sid;
if(!$sid)
exit("sid值未传入进去");
$params=array();
$params["msg"] =$msg;
$params["u"] =$to_num;
$params["saveURL"] = 0;
$params["do"] ="send";
$params["on"] = 1;
$params["aid"] ="发送";
$url="http://q16.3g.qq.com/g/s?sid=".$sid;
echo$data=$this->http->post($url, http_build_query($params));
return$data;
}

functiongetMsg($qq_num= 0,$sid= 0) {
$qq_num=$qq_num?$qq_num:$this->qq_num;
if(!$qq_num)
exit("qq_num值未传入进去");
$sid=$sid?$sid:$this->sid;
if(!$sid)
exit("sid值未传入进去");
$url="http://q16.3g.qq.com/g/s?sid=".$sid."&3G_UIN=".$qq_num."&saveURL=0&aid=nqqChat";
$data=$this->http->get($url);
preg_match("/name=\"u\" value=\"(\d+)\"/",$data,$matches);
$result["qq"] =$matches[1];
$data=explode("<form",$data);
$data=$data[0];
preg_match_all("/<p>(.+)?<\/p>/",$data,$matches);
unset($matches[1][0]);
$result["content"] =$matches[1];
return$result;
}
functionlogout($sid){
$url="http://pt.3g.qq.com/s?sid=".$sid."&aid=nLogout";
echo$url;
echo$this->http->get($url);
}
functiongetFriendsList($qq_num= 0,$sid= 0){
$result=array();

$qq_num=$qq_num?$qq_num:$this->qq_num;
if(!$qq_num)
exit("qq_num值未传入进去");
$sid=$sid?$sid:$this->sid;
if(!$sid)
exit("sid值未传入进去");
$url="http://q16.3g.qq.com/g/s?aid=nqqchatMain&sid=".$sid."&myqq=".$qq_num;
while(true){
$i=1;
$url.="&p=".$i;
$data=$this->http->get($url);
preg_match_all("/u=(.+?)&/",$data,$matches);
foreach($matches[1]as$key=>$value){
$result[]=$value;
}
if(count($matches[1])<13)
break;
$i++;
}
return$result;
}
}

<?php
//PHP代码
classhttp_no_cookie {

private$curl;
public$user_agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.29 Safari/525.13";

publicfunctionget($url) {
$this->curl = curl_init();
curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, 8);
curl_setopt($this->curl, CURLOPT_URL,$url);
curl_setopt($this->curl, CURLOPT_HEADER, 0);
curl_setopt($this->curl, CURLOPT_USERAGENT,$this->user_agent);
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);
$data= curl_exec($this->curl);
curl_close($this->curl);
return$data;
}

publicfunctionpost($url,$params) {
$this->curl = curl_init();
curl_setopt($this->curl, CURLOPT_CONNECTTIMEOUT, 8);
curl_setopt($this->curl, CURLOPT_URL,$url);
curl_setopt($this->curl, CURLOPT_HEADER, 1);
curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($this->curl, CURLOPT_POST, 1);
curl_setopt($this->curl, CURLOPT_USERAGENT,$this->user_agent);
curl_setopt($this->curl, CURLOPT_POSTFIELDS,$params);
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);
$data= curl_exec($this->curl);
curl_close($this->curl);
return$data;
}

}

?>

‘叁’ 开源qq机器人框架能一直用吗

开源qq机器人框架是能一直用的,关于开源qq机器人的介绍:

阅读全文

与疾风qq机器人源码相关的资料

热点内容
python数组分片 浏览:251
linux图形化编程 浏览:175
阿里国际站app端怎么装修 浏览:528
微信小程序云开发简单搭建源码 浏览:851
以后缺程序员吗 浏览:293
jsp源码不能运行 浏览:363
淘客助手源码下载 浏览:733
如何使用app记账报税 浏览:562
python线程捕捉键盘 浏览:25
地推统计图app怎么做 浏览:162
android文件夹不能用了 浏览:857
加密软件的日志 浏览:892
肾病pdf 浏览:230
网站怎么用本地服务器 浏览:120
javadoc导入android 浏览:517
文件扫描成pdf 浏览:696
凉山火灾救援命令 浏览:54
压缩机三相检测 浏览:861
linux怎么安装光盘 浏览:799
宽带服务器无响应是为什么 浏览:226