Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading data from a table on internett

Status
Not open for further replies.

Kudel

Programmer
Dec 3, 2002
36
NO
Hi!

I need to read data from a table on the internett. I do not know how, so any help or tip will be appreciated!

-Kudel:)
 
you can try to catch whole page with FastNet's NMHTTP..
or you can use Socket connection and send
GET HTTP/1.x /page/address string to the socket,
then read the received result then parse it by yourself..
or you can use XML components for XML based pages..
 
When you say 'table', do you mean a database table or do you mean an HTML table?

Andrew
 
I nead to read a HTML table!

-Kudel:)
 
The simplest way to get a web page is to use the function URLDownloadToFile. This is much easier to use than ICS or NetMaster components.

You will need to add UrlMon to your uses clause. Your code should look something like:
Code:
uses UrlMon;
...
  url := '[URL unfurl="true"]www.website\pages\wanted.html';[/URL]
  filename := 'C:\webpage.txt';
  URLDownloadToFile ( nil, url, filename, 0, nil );
...
This copies the HTML from the web page to the file specified in filename.

I presume you know how to parse the HTML file to get the data in the table that you want. I would use the Parse function in the excellent (free) HyperString library.

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top