Y
yixuch
Unregistered / Unconfirmed
GUEST, unregistred user!
var
add:TStringList;
r:Tmemorystream;
cookie:string;
定义变量
begin
add:=TStringList.Create;
r:=Tmemorystream.Create;
idhttp1.Request.SetHeaders; //最重要的初始化。
cookie:='BBSMainFrameURL=%2Fbbs%2Fvipitem%2Easp%3Fcolumntitle%3D%B4%F3%D5%BD%C9%F1'+'power=48'+'vt=AT%40KL%5F%5C%10CFF%07%60tOGO'+'WT_FPC=id=2c1e60c9b1f554eca471189574175828'+'lv=1189625499687'+'ss=1189625391734'+'ASPSESSIONIDCCCQRTSB=FINNBAHDJPEADFIFELGHOBKF'+'JRJ.SSOUser=167a26fcd0f8ebfd02a84f675911c4039996d64b11e4e85fbad90e7bec2579c89cfdb4c0cf99edcd'+'bcde8009d1b03959d2c875a18e64e5a4160c3fea72a89ce0c60afe0be44ccd745a083c8abac2f711b5669dff8ee7d24ee2f'+'d4df8806e57b1fe6ea905f16f36a2d4faab3743db55b89be876ee397c2f60fa4ba51ecfeede70'; 这是cookie
add.Add('checked=doform' );
add.Add('Body=%3Cbr%3Eabcdefg%3Cbr%3E' );
add.Add('articleID=29438917' );
add.Add('postdate=2007-09-13') ;
add.Add('cnav=%B4%F3%D5%BD%C9%F1');
add.add('page=1000') ;
add.add('bbs_formatSelect=%B6%CE%C2%E4%B8%F1%CA%BD');
add.Add('FontName=%D7%D6%CC%E5' );
add.Add('FontSize=%D7%D6%BA%C5');
这是要提交的内容
idhttp1.Request.Accept:='image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*';
idhttp1.Request.Referer :='http://bbs.jrj.com.cn/bbs/bbsreader.asp?folder=2007-09-13&id=29438917&cnav=大战神';
idhttp1.Request.AcceptLanguage:='zh-cn';
idhttp1.Request.ContentType:='application/x-www-form-urlencoded';
idhttp1.Request.UserAgent:=' Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)';
idhttp1.Request.Host:='bbs.jrj.com.cn';
idhttp1.Request.ContentLanguage:='225';
idhttp1.Request.Connection :='Keep-Alive';
idhttp1.Request.CacheControl :=' no-cache';
这是构件HTTP的头
idhttp1.Request.RawHeaders.Add('Cookie:'+ cookie);
这是把cookie增加到HTTP头中
edit1.Text := idhttp1.Request.RawHeaders.Values['Cookie'];
用这句可以得到COOKIE的里的值;
IdHTTP1.Post('http://bbs.jrj.com.cn/bbs/doreply.asp',add,r);
showmessage('ok');
end;
在edit1.中我看到了。我要提交的COOKIE 但是,我用vsniffer拦截的HTTP中的信息中。里面cookie的值什么都没有。连cookie:这都没
那位大虾知道是怎么回事情啊,请赐教。
add:TStringList;
r:Tmemorystream;
cookie:string;
定义变量
begin
add:=TStringList.Create;
r:=Tmemorystream.Create;
idhttp1.Request.SetHeaders; //最重要的初始化。
cookie:='BBSMainFrameURL=%2Fbbs%2Fvipitem%2Easp%3Fcolumntitle%3D%B4%F3%D5%BD%C9%F1'+'power=48'+'vt=AT%40KL%5F%5C%10CFF%07%60tOGO'+'WT_FPC=id=2c1e60c9b1f554eca471189574175828'+'lv=1189625499687'+'ss=1189625391734'+'ASPSESSIONIDCCCQRTSB=FINNBAHDJPEADFIFELGHOBKF'+'JRJ.SSOUser=167a26fcd0f8ebfd02a84f675911c4039996d64b11e4e85fbad90e7bec2579c89cfdb4c0cf99edcd'+'bcde8009d1b03959d2c875a18e64e5a4160c3fea72a89ce0c60afe0be44ccd745a083c8abac2f711b5669dff8ee7d24ee2f'+'d4df8806e57b1fe6ea905f16f36a2d4faab3743db55b89be876ee397c2f60fa4ba51ecfeede70'; 这是cookie
add.Add('checked=doform' );
add.Add('Body=%3Cbr%3Eabcdefg%3Cbr%3E' );
add.Add('articleID=29438917' );
add.Add('postdate=2007-09-13') ;
add.Add('cnav=%B4%F3%D5%BD%C9%F1');
add.add('page=1000') ;
add.add('bbs_formatSelect=%B6%CE%C2%E4%B8%F1%CA%BD');
add.Add('FontName=%D7%D6%CC%E5' );
add.Add('FontSize=%D7%D6%BA%C5');
这是要提交的内容
idhttp1.Request.Accept:='image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*';
idhttp1.Request.Referer :='http://bbs.jrj.com.cn/bbs/bbsreader.asp?folder=2007-09-13&id=29438917&cnav=大战神';
idhttp1.Request.AcceptLanguage:='zh-cn';
idhttp1.Request.ContentType:='application/x-www-form-urlencoded';
idhttp1.Request.UserAgent:=' Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)';
idhttp1.Request.Host:='bbs.jrj.com.cn';
idhttp1.Request.ContentLanguage:='225';
idhttp1.Request.Connection :='Keep-Alive';
idhttp1.Request.CacheControl :=' no-cache';
这是构件HTTP的头
idhttp1.Request.RawHeaders.Add('Cookie:'+ cookie);
这是把cookie增加到HTTP头中
edit1.Text := idhttp1.Request.RawHeaders.Values['Cookie'];
用这句可以得到COOKIE的里的值;
IdHTTP1.Post('http://bbs.jrj.com.cn/bbs/doreply.asp',add,r);
showmessage('ok');
end;
在edit1.中我看到了。我要提交的COOKIE 但是,我用vsniffer拦截的HTTP中的信息中。里面cookie的值什么都没有。连cookie:这都没
那位大虾知道是怎么回事情啊,请赐教。