unit Main_U;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP, StdCtrls, Buttons, Mask, DBCtrlsEh;
type
TMain_F = class(TForm)
idhtp1: TIdHTTP;
lbl1: TLabel;
lbl2: TLabel;
lbl3: TLabel;
lbl4: TLabel;
edt1: TDBNumberEditEh;
edt2: TDBNumberEditEh;
btn1: TBitBtn;
btn2: TBitBtn;
procedure btn1Click(Sender: TObject);
procedure btn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Main_F: TMain_F;
implementation
{$R *.dfm}
procedure TMain_F.btn1Click(Sender: TObject);
var
I : Integer;
PostList : TStringList;
begin
btn1.Enabled := False;
btn2.Enabled := True;
PostList := TStringList.Create;
PostList.Values['names'] := 'Name';
PostList.Values['sex'] := '男';
PostList.Values['agey'] := '1983';
PostList.Values['agem'] := '1';
PostList.Values['telb'] := '0755';
PostList.Values['TEL'] := '28121215';
PostList.Values['mb'] := '13838385438';
PostList.Values['area'] := '上海';
PostList.Values['city'] := '上海';
PostList.Values['job'] := '销售';
PostList.Values['EMAIL'] := 'hhh@hhh.com';
PostList.Values['ptitle'] := 'lesson';
PostList.Values['idx'] := '';
PostList.Values['Submit.x'] := '75';
PostList.Values['Submit.y'] := '12';
PostList.Values['Submit'] := '提交即可学习五十音图';
for I := 1 to edt1.Value do
begin
try
idhtp1.Post('http://www.sakurajp.com.cn/free/lesson/login.asp',PostList);
except
end;
Caption := IntToStr(I);
Application.ProcessMessages;
if not btn2.Enabled then
begin
Break;
end;
Sleep(edt2.Value);
end;
PostList.Free;
end;
procedure TMain_F.btn2Click(Sender: TObject);
begin
btn2.Enabled := False;
btn1.Enabled := True;
end;
end.
评论10
最新资源