
15.09.2010, 10:25
|
 |
Местный
|
|
Регистрация: 04.04.2008
Адрес: Минск
Сообщения: 596
Версия Delphi: 2007 & JAVA EE
Репутация: 10670
|
|
лови:
На форму кидаешь memo, edit, idhttp,button
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP, StdCtrls;
type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
Edit1: TEdit;
Label1: TLabel;
IdHTTP1: TIdHTTP;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function GetBefore(substr, str:string):string;
begin
if pos(substr,str)>0 then
result:=copy(str,1,pos(substr,str)-1)
else
result:='';
end;
function GetAfter(substr, str:string):string;
begin
if pos(substr,str)>0 then
result:=copy(str,pos(substr,str)+length(substr),length(str))
else
result:='';
end;
procedure TForm1.Button1Click(Sender: TObject);
var link:string;
param:tstringlist;
begin
param:=TStringList.Create;
param.Add('dN6VJ=1');
param.Add('uin='+edit1.Text);
link:='http://kanicq.ru/invisible/';
memo1.Text:=Idhttp1.Post(link,param) ;
label1.Caption:=GetBefore('</b></strong></p>',GetAfter('" style="vertical-align:middle;"> ', memo1.text));
param.Free;
end;
end.
__________________
Последний раз редактировалось Admin, Сегодня в 10:32.
|