Download HTML
lazarus / 38-Networking and Web Programming
----------------------------------------------------------------------
tuxmartin · 2011-08-24 20:12
I need to download this HTML
http://dl.dropbox.com/u/6943408/version.html and save the content into
a variable => version := '1 .0 '
I tried download http://dl.dropbox.com/u/6943408/version.html in wget
and save to text file and then open this file in Lazarus.
How can I do without wget?
http://www.gnu.org/s/wget/
----------------------------------------------------------------------
IndianaJones · 2011-08-24 20:28
have a look at this web page.
http://synapse.ararat.cz/doku.php/public:howto
----------------------------------------------------------------------
Silvio Clécio · 2011-08-24 21:04
This is very simple, please see:
http://imagebin.org/169524
Demo:
Code: [Select]uses
LSHTTPSend;
procedure TForm1.Button1Click(Sender: TObject);
var
VVersion: TStringList;
begin
VVersion := TStringList.Create;
try
LSHTTPGetText('http://dl.dropbox.com/u/6943408/version.html',
VVersion);
if VVersion.Text <> '' then
Edit1.Text := VVersion.Text
else
ShowMessage('Could not get the version.');
finally
VVersion.Free;
end;
end;
SVN of LazSolutions (use TortoseSVN to download all sources):
http://lazsolutions.googlecode.com/svn
Good luck.