導航:首頁 > 源碼編譯 > qq機器人java腳本源碼分享

qq機器人java腳本源碼分享

發布時間:2023-08-19 03:58:10

『壹』 求QQ 智能 自動聊天 機器人 易語言源碼 !最好是能在QQ群里用的 ,能自動...

夢真機器人注冊碼的,軟體你自己下吧 剛才加你了,我這就發你郵箱吧 不用加我了

『貳』 易語言做的QQ機器人源碼 簡單一點的 把那個模擬按鍵的什麼的弄出來就可以

QQ機器人就是通過webQQ網頁版QQ,進行程序模擬登陸,例如抓取他的post包。得到吧群裡面的信息,然後通過自己的語言庫判斷或者直接網路聊天助手進行計算回答就行了。
推薦你下載酷Q軟體目前做的比較不錯的QQ機器人,你可以用易語言寫插件給QQ機器人使用,目前市面上的QQ機器人都是通過這個程序開源的源碼修改的。

『叄』 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機器人步驟如下:

1、網路搜索「第十代QQ機器人」。見下圖:

閱讀全文

與qq機器人java腳本源碼分享相關的資料

熱點內容
at89c51編程器 瀏覽:341
項目經理叫醒程序員 瀏覽:342
autocad旋轉命令 瀏覽:660
手機版wpsoffice怎麼打包文件夾 瀏覽:579
在成都學車用什麼app 瀏覽:818
grep命令管道 瀏覽:426
java修改重啟 瀏覽:567
單片機供電方案 瀏覽:770
airpodspro一代怎麼連接安卓 瀏覽:218
豌豆莢app上有什麼游戲 瀏覽:283
公路商店app標簽選什麼 瀏覽:339
linuxoracle命令行登錄 瀏覽:227
android深度休眠 瀏覽:173
php微信開發例子 瀏覽:846
醫得app登錄密碼是什麼 瀏覽:142
spring開發伺服器地址 瀏覽:412
伺服器上如何查看伺服器的埠 瀏覽:678
單片機伺服器編譯 瀏覽:770
單口usb列印機伺服器是什麼 瀏覽:859
戰地五開伺服器要什麼條件 瀏覽:956