473,371 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,371 software developers and data experts.

reading an internet page

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:

Expand|Select|Wrap|Line Numbers
  1. AnsiString link;
  2. link = "http://www.cnn.com";
  3. NMHTTP1->Get(link);
  4. MyList = new TStringList;
  5. MyList->Add(NMHTTP1->Body);
  6. MyList -> SaveToFile("test.txt");
  7. delete MyList;
  8.  
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!
Apr 8 '08 #1
0 1042

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Luca | last post by:
Hello Everybody, I'm a 26 years old Italian "Florentine" Computer technician :) I'm writing you about an idea that I've got of a function that could be introduced in new web browsers (or even...
6
by: Eddie | last post by:
When I use JavaScript to read an element's textDecoration style, I only get one value even if there are more than one in the sytle sheet. For example if the text-decoration is defined as:...
1
by: Jonathan | last post by:
I have been using document.cookie to write and read cookies. Unfortunately, when I open my page in Internet Explorer, I don't see what I wrote to my cookie while in Netscape Navigator. Similarly,...
7
by: gino | last post by:
Dear all, My monitor was set to 1600x1200 so the fonts in IE is too small for me even when I set the "View->Text Size->Largest"... I don't have previlage to change the monitor resolution... ...
0
by: Ben | last post by:
Hello, I am reading a web page using httpwebrequest and httpwebresponse that contains HTML and javascript code. When I read the page I can only read the translated HTML code. I want to read the...
5
by: Edward Mitchell | last post by:
Is there a way that I can repair MS Internet Explorer? I seem to have broken it somewhere. I have been developing a .NET app. Three days ago I saw a message box in a web site that I visit saying...
4
by: milkyway | last post by:
Hi ;-) I have created a .aspx file that has the following: DataSet ds = new DataSet(); ds.ReadXml(Server.MapPath("TestInput.xml")); As far as I can tell, the first line does not work - at...
3
by: Hugh O | last post by:
Hi, I am implementing an internet app via Visual Studio.Net 2003 using VB.Net. There are numerous references within the Help facilities for using or passing data between Internet pages via...
2
by: kinh | last post by:
In my current PHP project, I have to read pages from a website and parse the data. If using the Internet browser, I would have to do the following steps: Step 1: specify the state to display by...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.