Hi,
I'm fairly new at programming, so bear with me ;-) I use borland c++ builder to do some programming. I sometimes have a problem reading an internet page using the NMHTTP component. I use the following code fragment to read a page and output it to a text file:
This works most of the times. However, sometimes the program kind of "hangs". The cpu uses 100% but the page is not loaded. The page is accessible though when I use a normal web browser. So my question is if there is a way to check that the nmhttp component succesfully connects and loads the page or else have it retry the connection or...?
Thanks!
I'm fairly new at programming, so bear with me ;-) I use borland c++ builder to do some programming. I sometimes have a problem reading an internet page using the NMHTTP component. I use the following code fragment to read a page and output it to a text file:
Code:
AnsiString link;
link = "http://www.cnn.com";
NMHTTP1->Get(link);
MyList = new TStringList;
MyList->Add(NMHTTP1->Body);
MyList -> SaveToFile("test.txt");
delete MyList;
Thanks!