Quantcast
Channel: Сообщество PHP DevelStudio - среда разработки программ
Viewing all articles
Browse latest Browse all 6336

получить содержимое страницы

$
0
0
Пытаюсь получить html код с сайта rghost.ru
Скрытый текст:

Код:

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;
    Memo1: TMemo;
    IdHTTP1: TIdHTTP;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
  TMyThread = class(TThread)
    private
    { Private declarations }
  protected
    procedure Sync;
    procedure Execute; override;
  end;

var
  Form1: TForm1;
  MyThread: TMyThread;
  get: string;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
i:integer;
begin
  MyThread:=TMyThread.Create(False);

  MyThread.Priority:=tpNormal;
end;

{ TMyThread }

procedure TMyThread.Execute;
begin
form1.idHTTP1.HandleRedirects:=true;
get:= form1.IdHTTP1.Get('http://rghost.ru');
Synchronize(Sync);
end;

procedure TMyThread.Sync;
begin
form1.memo1.Lines.Add(get);
end;

end.


но при нажатии на кнопку ничего не происходит..
Вот при получении с сайта http://ya.ru или http://yandex.ru все нормально.
Мб у ргхост "защита" ?

Viewing all articles
Browse latest Browse all 6336

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>