自动发帖 我办了个论坛,想写个自动批量发帖的软件不知道谁有这方面的资料提供点阿自动发帖在英文怎么说阿我想在http://www.codeproject.com找找看 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个用其他的工具简单些,比如LoadRunner,你指定url之后,它给你弹出ie,你按照发帖的步骤做一遍,基本脚本(C语法)就生成了.然后你把脚本稍微改一下,就可以批量发帖了~如果要VC的写,就麻烦些使用WebBrowser控件连接到发帖的url,找到输入内容的网页元素,模拟填值,模拟点击发帖按钮...主要就是使用COM操作不同的 IHTMLXXXX 接口 用脚本等来实现自动化,web,如ruby,C#等都有操作web的自动化库 脚本工具是最好的办法英文大概是automatic post之类 自动发帖不难,难的是你要过得了图像识别Captcha 我不要验证码,我是管理员,我是想维护我自己的轮胎简单点,手工发帖太难了我的论坛http://www.ChinaNETClass.com 用post方式发帖其实很简单那你如果保持住cooike的话连登录都可以免了 CInternetSession session; CHttpConnection* pServer; CHttpFile* pf; CString ServerName = "192.168.172.128"; INTERNET_PORT nPort = 80; DWORD retcode; char name[20],psw[20]; memset(name, 0, 20); memset(psw, 0, 20); GetDlgItemText(IDC_USER,name, 20); GetDlgItemText(IDC_PSW, psw, 20); char out[300] = "&CookieDate=3&userhidden=2&comeurl=\ http://192.168.172.128/index.asp&submit=%B5%C7+%C2%BC\r\n"; char outBuff[300] = ""; sprintf(outBuff, "username=%s&password=%s%s",name, psw, out); pServer = session.GetHttpConnection(ServerName,nPort); pf = pServer->OpenRequest(CHttpConnection::HTTP_VERB_POST,"/login.asp?action=chk"); pf -> AddRequestHeaders("Content-Type: application/x-www-form-urlencoded"); pf -> AddRequestHeaders("Host: 192.168.172.128"); pf -> AddRequestHeaders("Connection: Keep-Alive"); pf -> SendRequest(NULL,0,outBuff,strlen(outBuff)+1); delete pServer; delete pf; session.Close(); 去找找开源的库:http://sourceforge.net/ 主要图灵问题,解放方案这里有http://www.wy456.com.cn/cate343/34.html CInternetSession session; CHttpConnection* pServer; CHttpFile* pf; CString ServerName = "192.168.172.128"; INTERNET_PORT nPort = 80; DWORD retcode; char name[20],psw[20]; memset(name, 0, 20); memset(psw, 0, 20); GetDlgItemText(IDC_USER,name, 20); GetDlgItemText(IDC_PSW, psw, 20); char out[300] = "&CookieDate=3&userhidden=2&comeurl=\ http://192.168.172.128/index.asp&submit=%B5%C7+%C2%BC\r\n"; char outBuff[300] = ""; sprintf(outBuff, "username=%s&password=%s%s",name, psw, out); pServer = session.GetHttpConnection(ServerName,nPort); pf = pServer->OpenRequest(CHttpConnection::HTTP_VERB_POST,"/login.asp?action=chk"); pf -> AddRequestHeaders("Content-Type: application/x-www-form-urlencoded"); pf -> AddRequestHeaders("Host: 192.168.172.128"); pf -> AddRequestHeaders("Connection: Keep-Alive"); pf -> SendRequest(NULL,0,outBuff,strlen(outBuff)+1); delete pServer; delete pf; session.Close(); 【VC】如何启用“立体声混音” MFC问题! 怎样使从CDialog派生的类做基类 请问下:如何在程序里向某个网页的一个编辑框里填写字符串 谢谢(急) 急招C++高级软件工程师 为什么没有将编辑框中内容保存到文件中?(昨天得人指点后还是没有试出来)急 优化SOCKET的速度 求助:如何将工具栏中的按钮变成单选一按钮? 路径及Ini文件问题 对话框画图 请教win7下Mixer API设置不了音量的问题 VC++中如何修改对话框类名
然后你把脚本稍微改一下,就可以批量发帖了~如果要VC的写,就麻烦些
使用WebBrowser控件
连接到发帖的url,找到输入内容的网页元素,模拟填值,模拟点击发帖按钮...
主要就是使用COM操作不同的 IHTMLXXXX 接口
英文大概是automatic post之类
我的论坛http://www.ChinaNETClass.com
CHttpConnection* pServer;
CHttpFile* pf;
CString ServerName = "192.168.172.128";
INTERNET_PORT nPort = 80;
DWORD retcode;
char name[20],psw[20];
memset(name, 0, 20);
memset(psw, 0, 20);
GetDlgItemText(IDC_USER,name, 20);
GetDlgItemText(IDC_PSW, psw, 20);
char out[300] = "&CookieDate=3&userhidden=2&comeurl=\
http://192.168.172.128/index.asp&submit=%B5%C7+%C2%BC\r\n";
char outBuff[300] = "";
sprintf(outBuff, "username=%s&password=%s%s",name, psw, out);
pServer = session.GetHttpConnection(ServerName,nPort);
pf = pServer->OpenRequest(CHttpConnection::HTTP_VERB_POST,"/login.asp?action=chk");
pf -> AddRequestHeaders("Content-Type: application/x-www-form-urlencoded");
pf -> AddRequestHeaders("Host: 192.168.172.128");
pf -> AddRequestHeaders("Connection: Keep-Alive");
pf -> SendRequest(NULL,0,outBuff,strlen(outBuff)+1);
delete pServer;
delete pf;
session.Close();
CHttpConnection* pServer;
CHttpFile* pf;
CString ServerName = "192.168.172.128";
INTERNET_PORT nPort = 80;
DWORD retcode;
char name[20],psw[20];
memset(name, 0, 20);
memset(psw, 0, 20);
GetDlgItemText(IDC_USER,name, 20);
GetDlgItemText(IDC_PSW, psw, 20);
char out[300] = "&CookieDate=3&userhidden=2&comeurl=\
http://192.168.172.128/index.asp&submit=%B5%C7+%C2%BC\r\n";
char outBuff[300] = "";
sprintf(outBuff, "username=%s&password=%s%s",name, psw, out);
pServer = session.GetHttpConnection(ServerName,nPort);
pf = pServer->OpenRequest(CHttpConnection::HTTP_VERB_POST,"/login.asp?action=chk");
pf -> AddRequestHeaders("Content-Type: application/x-www-form-urlencoded");
pf -> AddRequestHeaders("Host: 192.168.172.128");
pf -> AddRequestHeaders("Connection: Keep-Alive");
pf -> SendRequest(NULL,0,outBuff,strlen(outBuff)+1);
delete pServer;
delete pf;
session.Close();