求用IDHTTP在淘宝自动回复帖子的代码(200分)

  • 主题发起人 主题发起人 delphilxh
  • 开始时间 开始时间
D

delphilxh

Unregistered / Unconfirmed
GUEST, unregistred user!
使用idhttp在淘宝自动发帖的代码
 
淘宝社区的登陆不用验证码识别 不难 不过 楼主想干什么[:)]
 
登陆我搞定了,发帖难住了,那位帮帮我,分可以再加
 
这是在动网[灌水乐园]发贴的程序,其他类似,给分[:D]
procedure TForm1.Button1Click(Sender: TObject);
const
BaseURL = 'http://bbs.dvbbs.net/'; //论坛所在地址
UserName = 'guestabc'; //登录用户名
Password = 'guestabc'; //登录密码

CookieNone = 0; //不保留Cookie
CookieDay = 1; //保留Cookie一天
CookieMonth = 2; //保留Cookie一月
CookieYear = 3; //保留Cookie一年

UserNormal = 2; //正常登录
UserHidden = 1; //隐身登录

BoardID = 2; //DVBBS中的灌水乐园,其他只用知道版块号即可,也可根据得到的页面自动提取版块号
var
Params: TStrings;
HTML: String;
MD5Pass: String;
p1,p2: Integer;
begin
Params:=TStringList.Create;
try
Params.Add('username='+UserName);
Params.Add('password='+Password);
Params.Add('CookieDate='+InttoStr(CookieNone));
Params.Add('userhidden='+InttoStr(UserNormal));
Params.Add('comeurl='+BASEURL+'index.asp');
HTML:=IdHttp.Post(BaseURL+'login.asp?action=chk',Params);
if Pos(BASEURL+'index.asp',HTML)=0 then
begin
ShowMessage('登录失败');
Exit;
end;

HTML:=IdHttp.Get(BASEURL+'announce.asp?boardid='+InttoStr(BoardID));
p1:=Pos('Dvbbs.MemberWord=''',HTML);
if p1=0 then
begin
ShowMessage('获取HTML失败!');
Exit;
end;
Inc(p1,18);
p2:=PosEx('''',HTML,p1);

MD5Pass:=Copy(HTML,p1,p2-p1);

Params.Clear;
Params.Add('followup=');
Params.Add('rootID=');
Params.Add('star=');
Params.Add('TotalUseTabl=');
Params.Add('upfilerename=');
Params.Add('username='+UserName);
Params.Add('passwd='+MD5Pass);
Params.Add('font='+'[灌水]');
Params.Add('subject='+'测试,请版主删除!'); //发帖标题,不得超过 25 个汉字或50个英文字符
Params.Add('Expression='+'face1.gif'); //发帖心情,请自行查阅心情图片名称
Params.Add('Content='+'测试,请版主删除!'+#13#10+'测试内容'); //发帖内容
Params.Add('emailflag='+'yes'); //有回复时使用邮件通知您?
Params.Add('signflag='+'yes'); //是否显示您的签名?

IdHttp.Request.Referer:=BASEURL+'announce.asp?boardid='+InttoStr(BoardID);
HTML:=IdHttp.Post(BaseURL+'Saveannounce.asp?boardID='+InttoStr(BoardID),Params);
if Pos('错误信息',HTML)>0 then
ShowMessage('发帖不成功!')
else
ShowMessage('发帖成功!');
finally
Params.Free;
end;
end;
 
试了下,报错
还有,
HTML:=IdHttp.Post(BaseURL+'Saveannounce.asp?boardID='+InttoStr(BoardID),Params);

boardID= 这个参数为什么没有放到params里?
 
tmpStr.Add('fmf.me._0.s=Re:06-07秋冬 施华洛世奇新品之Chrismas');
tmpStr.Add('_fmf.me._0.b=不错的帖子,帮顶 !!!!!');
tmpStr.Add('action=manage_message');
tmpStr.Add('quick=yes');
tmpStr.Add('_fmf.me._0.t=5981755');
tmpStr.Add('_fmf.me._0.f=21');
tmpStr.Add('_fmf.me._0.p=');
tmpStr.Add('event_submit_do_Send=快速回复');


IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
IdHTTP1.Request.UserAgent:= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)';
idhttp1.Request.Referer:='http://forum.taobao.com//forum-21/show_thread----5981755-.htm';
IdHTTP1.post('http://forum.taobao.com//forum-21/show_thread----5981755-.htm',tmpstr,response);

但总说主题必须填写,不知道怎么回事
 
哇,这也值500分?可惜最近偶比较懒。。。
 
会者不难,难者不会呀...
 
to WickedladII
你可以实现的话我可以给更多的分
 
还有效吗?

俺到是会做介动动
 
500分换500美圆 我放下手头1万元小软件来做 [8D]
 
俺去看了一下:
******post 数据 ******
POST http://forum.taobao.com/forum-55/show_thread----6122112-.htm HTTP/1.0
Accept: */*
Referer: http://forum.taobao.com/forum-55/show_thread----6122112-.htm
Accept-Language: zh-cn
Content-Type: application/x-www-form-urlencoded
Proxy-Connection: Keep-Alive
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Host: forum.taobao.com
Content-Length: 245
Pragma: no-cache
[red]Cookie: ab=43; _ad_=KeUKlnZ7HylUtAIx%2BmqhFAwu3P3dDcZ2XfVLDJG88EY3kBSjaoT%2BJLKh68j5w8I3AA%3D%3D; wd=bd0cf486ed7cdedd81da757370fc84b5_0db2%2C794bebbccc92bd677279e26d92ba6419_0db1; t=a4d1d23e614762aa9397d9aa4dbbfd87; wwwtaobaocom_user_from=http%3A%2F%2Fsearch.cn.yahoo.com%2Fsearch%3Fp%3D%25C9%25CF%25BA%25A3%2B%25B3%25E8%25CE%25EF%25CA%25B3%25C6%25B7%26source%3Dtoolbar_yassist_button%26pid%3D99691_1006; allyes_chsess=182; yahoo_adinfo=1155384032156; cookie2=b5504d1c0df7cd44e3ba3095634b960b; uc1=cookie21=LAnUCk8I6A%3D%3D&cookie14=KPi8TM27dvkGiA%3D%3D&cookie15=dHJ1ZQ==&cookie16=KKin%2FAhnIqa4L2oQFsUwiYZUpQ%3D%3D&cookie17=LfzI6uamgl4%3D; ademail=; cookie1=IGCjNzSiTgm70hFHEOvryI7bYOArcYC7MK6pZT9HhPI%3D; lastgetwwmsg=MTE1NTQ3ODU2MA%3D%3D; tracknick=%5Cu8868%5Cu9171%5Cu5B50; _cc_=LauChb6a8Q%3D%3D; _nk_=%5Cu8868%5Cu9171%5Cu5B50; _msg_=0

_fmf.me._0.s=Re%3A%B0%AE%C9%CF%D2%BB%B8%F6%C8%CB%B5%C4%A3%B8%B8%F6%D4%A4%D5%D7&_fmf.me._0.b=%D3%D0%B5%E3%D2%E2%CB%BC&action=manage_message&quick=yes&_fmf.me._0.t=6122112&_fm
f.me._0.f=55&_fmf.me._0.p=&event_submit_do_Send=%BF%EC%CB%D9%BB%D8%B8%B4[/red]
----***返回信息 (setcookies)
HTTP/1.1 200 OK
Date: Sun, 13 Aug 2006 14:18:06 GMT
Server: Apache
Pragma:: no-cache
Cache-Control:: no-cache
[red]Set-Cookie: uc1=cookie14=KPi8TM27dvkGiA%3D%3D&cookie17=LfzI6uamgl4%3D&cookie21=LAnUCk8I6A%3D%3D&cookie15=dHJ1ZQ==&cookie16=KKin%2FAhnIqa4L2oQFsUwiYZUpQ%3D%3D&cookie19=KPi8TM27dvo1CoDW%2Fw%3D%3D; [/red]Domain=.taobao.com; Path=/
Content-Language: zh-CN
Vary: Accept-Encoding
Connection: close
Content-Type: text/html;charset=GBK

东西稍多了些,不过一一分离 然后发送的时候再加到参数表里,应该可以啊
 
我试验了但总说主题必须填写,不知道怎么回事
 
idcookiemanager如何用.idhttp可以加cookie,我也想写站内信.
 
To delphilxh 我写好了一份淘宝群发器,自动提取某类型的帐号,然后开始自动发送。我现在就是想搞这个站内信.你QQ多少,我加你.一起探讨。
 
54weige:
我的qq是292397
 
后退
顶部