> I would like to download a file via HTTP, how can I achieve that in a
> platform independent way? What components to use and is there 
> some code suited for dummy's available.


If you don't mind using an external DLL, CurlPas is quite simple,
and works on Linux, Windows, and possibly even Mac...

========================
program simple;
uses curl_obj;
var
  Curl:TCurl;
begin
  Curl:=TCurl.Create(nil);
  Curl.URL:='http://www.freepascal.org/index.html';
  Curl.OutputFile:='fpc.htm';
  if ( not Curl.Perform ) then WriteLn(Curl.ErrorString);
  Curl.Free;
end;
=====================

And that's all there is to it! The library can automatically
follow any redirects, deal with cookies, handle https and ftp 
downloads, etc, etc, etc...

For more info, see:
  http://curlpas.sourceforge.net/
  http://curl.haxx.se/libcurl/


 - Jeff

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to