How to Extract Website Source Code in Delphi

I need a way to extract the source code of a site in Delphi and put it in TStrings or TStringList

likewise, when you click View Source in Internet Explorer, and it opens notepad and shows the source code.

Maybe we can use TWebBrowser, or I don’t know. Thanks.

+8
delphi
source share
1 answer

Using Indy, you can just do

Strings.Text := IdHttp.Get(URL); 

You really don't want to deploy TWebBrowser for a simple HTTP GET.

+8
source share

All Articles