POST /bbs/login.asp?action=chk HTTP/1.1
Accept: */*
Accept-Language: zh-cn
Referer: http://www.520os.com/bbs/login.asp
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: www.520os.com
Content-Length: 122
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: DvForum+8%2E2%5Fwww%2E520os%2Ecom=StatUserID=1167399427&username=&userclass=&password=&userhidden=&userid=&usercookies=; ystat_bc_229798=1890613032220251910; AJSTAT_ok_times=182; geturl=%2Fbbs%2Flogin%2Easp%3Faction%3Dchk; ASPSESSIONIDQSRDCTQR=PENDAOJCGJGJMHAMMNOAAIPD; AJSTAT_ok_pages=6分了二个包发出去
password=这里是密码&CookieDate=2&userhidden=2&comeurl=index.asp&submit=%u7ACB%u5373%u767B%u5F55&ajaxPost=1&username=这里是用户这个是动网的论坛的。
不知怎么写?????有人教下么?以下我写的。登不上?????procedure TForm1.Button1Click(Sender: TObject);
var
mytemp:tStringList;begin
mytemp:=tStringList.Create;
mytemp.Add('DvForum+8%2E2%5Fwww%2E520os%2Ecom=StatUserID=1167399427&username=&userclass=&password=&userhidden=&userid=&usercookies=; ');
mytemp.Add('ystat_bc_229798=1890613032220251910; AJSTAT_ok_times=182; geturl=%2Fbbs%2Flogin%2Easp%3Faction%3Dchk; ASPSESSIONIDQSRDCTQR=PENDAOJCGJGJMHAMMNOAAIPD; AJSTAT_ok_pages=6') ;
mytemp.Add('password=密码&CookieDate=2&userhidden=2&comeurl=index.asp&submit=%u7ACB%u5373%u767B%u5F55&ajaxPost=1&username=用户');
IdHTTP1.HandleRedirects := True;
IdHTTP1.Request.UserAgent:=' Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)';
IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
IdHTTP1.Post('http://www.520os.com/bbs/login.asp?action=chk',mytemp);
mytemp.Free;end;

解决方案 »

  1.   

             idhttp_l.Request.SetHeaders;
             idhttp_l.Request.CustomHeaders.Clear;
              idhttp_l.Request.CustomHeaders.Add(cookie_tmp);
      

  2.   

    一个idhttp 好像只能操作一个 cookie 如果多个 cookie 需要动态创建idhttp
      

  3.   

    cookie 信息好像不是写在提交参数里吧~~ ,论坛打不开啊
      

  4.   

                         
    guanzhu...
      

  5.   

    1樓的參考很詳細了,IdHttp和IdCookieManager可以自動管理Cookie,
    post的時候只發送用戶名和密碼試試。。