genom_x
28.04.2010, 13:18
Помогите люди добрые написать авторизацию на http://javagala.ru/ пишу всё как по видео авторизация на однокласниках ну не получатся помогите кому не трудно
вот форма
<form action='/auth.php' name='login' method='post'>
коды для авторизации
MASTER_KING;WS79J9NB50
///SPONSOR///;w9wnnr1i
[{SARUMAN}];HDS9NKX9
Мс-васян-;DTVZFVHLKK
x_CoRpse_x;76kr4ufq5t
Ярик092;8CYQY7BEIB
jbpvv46j9v
DTVZFVHLKK
6ohbjouttz
Z6RBOV359P
p1uubodt
vuxbyqrxv1
EMAULSBLN9
loqj7j84op
исходник
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
Edit2: TEdit;
Label3: TLabel;
IdHTTP1: TIdHTTP;
Edit3: TEdit;
Edit4: TEdit;
function Pars(T_, ForS, _T: string): string;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var StrPage, ssylka:string;
Data:TstringList;
begin
idhttp1.HandleRedirects:=true;
StrPage:=idhttp1.Get('http://javagala.ru/');
ssylka:=Pars('<form action='"',StrPage,'"');
Data:=TstringList.Create;
Data.Add('nick='+Edit1.Text);
Data.Add('recover='+Edit2.Text);
Data.Add('x='+Edit3.Text);
Data.Add('y='+Edit4.Text);
StrPage:=idhttp1.Post(ssylka, Data);
if Pos('exit', StrPage)<>0 then
Label3.Caption:='Залогинились'
else Label3.Caption:='Не залогинились';
Data.Free;
end;
function TForm1.Pars(T_, ForS, _T: string): string;
var
a, b: integer;
begin
Result := '';
if (T_ = '') or (ForS = '') or (_T = '') then
Exit;
a := Pos(T_, ForS);
if a = 0 then
Exit
else
a := a + Length(T_);
ForS := Copy(ForS, a, Length(ForS) - a + 1);
b := Pos(_T, ForS);
if b > 0 then
Result := Copy(ForS, 1, b - 1);
end;
end.
вот форма
<form action='/auth.php' name='login' method='post'>
коды для авторизации
MASTER_KING;WS79J9NB50
///SPONSOR///;w9wnnr1i
[{SARUMAN}];HDS9NKX9
Мс-васян-;DTVZFVHLKK
x_CoRpse_x;76kr4ufq5t
Ярик092;8CYQY7BEIB
jbpvv46j9v
DTVZFVHLKK
6ohbjouttz
Z6RBOV359P
p1uubodt
vuxbyqrxv1
EMAULSBLN9
loqj7j84op
исходник
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
Edit2: TEdit;
Label3: TLabel;
IdHTTP1: TIdHTTP;
Edit3: TEdit;
Edit4: TEdit;
function Pars(T_, ForS, _T: string): string;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var StrPage, ssylka:string;
Data:TstringList;
begin
idhttp1.HandleRedirects:=true;
StrPage:=idhttp1.Get('http://javagala.ru/');
ssylka:=Pars('<form action='"',StrPage,'"');
Data:=TstringList.Create;
Data.Add('nick='+Edit1.Text);
Data.Add('recover='+Edit2.Text);
Data.Add('x='+Edit3.Text);
Data.Add('y='+Edit4.Text);
StrPage:=idhttp1.Post(ssylka, Data);
if Pos('exit', StrPage)<>0 then
Label3.Caption:='Залогинились'
else Label3.Caption:='Не залогинились';
Data.Free;
end;
function TForm1.Pars(T_, ForS, _T: string): string;
var
a, b: integer;
begin
Result := '';
if (T_ = '') or (ForS = '') or (_T = '') then
Exit;
a := Pos(T_, ForS);
if a = 0 then
Exit
else
a := a + Length(T_);
ForS := Copy(ForS, a, Length(ForS) - a + 1);
b := Pos(_T, ForS);
if b > 0 then
Result := Copy(ForS, 1, b - 1);
end;
end.