|Posted by:||Remy Lebeau (TeamB) (email@example.com)|
|Date:||Fri, 2 Dec 2005|
"Codeman II" <thegentlem…@webmail.co.za> wrote in message
> Can anyone/someone please show me how to do this
> using the idHTTP component of Indy 9.
You already know how because you are already doing it. You just need to
remove some irrelevent pieces from your existing code. See below.
> What I had in mind was basically this but I receive an error:
> "Socket error # 11001 Host not found".
That is to be expected for invalid URLs.
> I am not sure what to specify as "Host" property?
You are not supposed to be using the Host property at all. Pass the full
URL to Get() only. It will parse the URL and fill in the Host property
internally as needed.
> Do I need to call "Connect()" prior to every "Get"
No. Get() manages the connection internally as needed.
> or just "Connect" once for all the "Get"s?
Don't call Connect() at all.
> Will idHTTP handle and follows Redirects when I have set
> "HandleRedirects := True" automatically?
With that said, try this code:
Errors := 0;
memStream := TMemoryStream.Create;
For X := 0 to UrlList.Count - 1 do
memStream.SaveToFile(IntToStr(X) + '.txt');
idHTTP??? posted by Codeman II on Fri, 2 Dec 2005