|
|
Регистрация | << Правила форума >> | FAQ | Пользователи | Календарь | Поиск | Сообщения за сегодня | Все разделы прочитаны |
|
Опции темы | Поиск в этой теме | Опции просмотра |
#1
|
|||
|
|||
Авто-регистрация barbars.ru. Нужна помощь
[spoiler]
Код:
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, XPMan; type TForm1 = class(TForm) XPManifest1: TXPManifest; IdHTTP1: TIdHTTP; Button1: TButton; Edit1: TEdit; Label1: TLabel; Label2: TLabel; ComboBox1: TComboBox; Label3: TLabel; ComboBox2: TComboBox; Label4: TLabel; ComboBox3: TComboBox; Edit2: TEdit; Label5: TLabel; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var s,s2,sex,side,pass,typ:string; var data,data2:TStringList; begin sex:=ComboBox1.Text; side:=ComboBox2.Text; typ:=ComboBox3.Text; pass:=Edit2.Text; if sex='мужской' then begin sex:='m' end else begin sex:='f' end; if side='юг' then begin side:='1' end else begin side:='2' end; if typ='воин' then begin typ:='1' end else typ:='2'; data:=TStringList.Create; data2:=TStringList.Create; data2.Add('password='+pass); data2.Add('password2='+pass); s:=IdHTTP1.Get('http://barbars.ru/registration/wicket:interface/:6:registrationForm::IFormSubmitListener::'); data.Add('login='+Edit1.Text); data.Add('sex='+sex); data.Add('side='+side); data.Add('typ='+typ); IdHTTP1.Post('http://barbars.ru/registration/wicket:interface/:6:registrationForm::IFormSubmitListener::',data); s2:=IdHTTP1.Get('http://barbars.ru/user/protection/0/1/wicket:interface/:15:passwordForm::IFormSubmitListener::'); IdHTTP1.Post('http://barbars.ru/user/protection/0/1/wicket:interface/:15:passwordForm::IFormSubmitListener::',data2); ShowMessage('Кажется всё вышло....'); end; end. P.S. после того как отправил первые данные (логин,клас,пол[data]) перекидует на другую страничку и просит создать пароль -[data2] Последний раз редактировалось KotTeam, 31.03.2014 в 21:00. |