鸿 网 互 联 www.68idc.cn

当前位置 : 服务器租用 > 编程语言开发 > delphi > >

Delphi Post登陆Delphi盒子论坛源码

来源:互联网 作者:佚名 时间:2013-05-11 11:21
unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Buttons, Vcl.OleCtrls, SHDocVw, IdBaseComponent, IdComponent, IdTCPConnec

unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Buttons, Vcl.OleCtrls, SHDocVw, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, Vcl.StdCtrls; type TForm1 = class(TForm) SpeedButton1: TSpeedButton; IdHTTP1: TIdHTTP; Memo1: TMemo; Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; procedure SpeedButton1Click(Sender: TObject); ; var Form1: TForm1; TForm1.SpeedButton1Click(Sender: TObject); Var cCon:TSTringList; cSTR,cText:TStringStream; i:Integer; TempHTTP:TIDHTTP; begin IdHTTP1:=TIDHTTP.Create(nil); TempHTTP:=TIDHTTP.Create(nil); cCon:=TStringList.Create; IDHTTP1.HandleRedirects:=True; TempHTTP.HandleRedirects:=True; cText:=TStringStream.Create; IDHTTP1.Request.Accept:=; IDHTTP1.Request.Accept:=IDHTTP1.Request.Accept+; IDHTTP1.Request.Referer:=; IDHTTP1.Request.UserAgent:=; IDHTTP1.Request.ContentType:=; IDHTTP1.Request.AcceptEncoding:=; IDHTTP1.Request.Host:=; IDHTTP1.Request.CacheControl := ; idhttp1.Request.Connection := ; cCon.Add(+Trim(Edit1.Text)); cCon.Add(+Trim(Edit2.Text)); cCon.Add(); IDHTTP1.Post(,cCon,cText); // Edit3.Text:=IDHTTP1.Response.RawHeaders.Text; Edit3.Text:=Edit3.Text+IDHTTP1.CookieManager.CookieCollection.Cookies[i].Value; //IDHTTP1.GET(,cText); TempHTTP.Get(,cText); Memo1.Text:=cText.DataString; cText.Free; end; end. ,香港空间网站空间香港空间

网友评论
<