|Posted by:||Codeman II (thegentlem…@webmail.co.za)|
|Date:||Fri, 2 Dec 2005|
I have tried but do not succeed.
My previous post did not leed to much victory as well.
1. I have a list of URLS (some might be invalid or dead).
2. I want to download these URLS (webpages) html source to local disk.
3. And do proper error handling / trapping.
Can anyone/someone please show me how to do this using the idHTTP component
of Indy 9.
I am using Delphi 7.
What I had in mind was basically this but I receive an error: "Socket error
# 11001 Host not found".
1. I am not sure what to specify as "Host" property?
2. Do I need to call "Connect()" prior to every "Get" or just "Connect" once
for all the "Get"s?
3. Will idHTTP handle and follows Redirects when I have set "HandleRedirects
:= True" automatically?
Examples and readings wil all appreciated.
Here is my example:
idHTTP.Host := "127.0.0.1";
idHTTP.Port := 80;
Errors := 0;
For X := 0 to UrlList.Count - 1 do
memStream := TMemoryStream.Create;
memStream.SaveToFile(IntToStr(X) + '.txt');
Thanks a million!