Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello experts,

I want program in C++/.NET which will read real-time data from given web page and publish it on screen.

i.e. It should refresh web-pages in every 2 sec or so and should capture new data.

It would be great help , if any body can give pointers on this.

Thanks.
Posted
Updated 4-Oct-10 21:36pm
v2
Comments
kumars_99 5-Oct-10 0:33am    
Program should read data from different web-pages and should display on screen at a time.
LittleYellowBird 5-Oct-10 3:39am    
Hi, I have removed your 'text speak' as it is best not to use 'text speak' in your questions, it is hard enough for non-English speakers to understand technical questions. So always try to use the correct spellings, then everyone can understand you clearly and you will be more likely to get the help you require. Just a suggestion. :)

1 solution

You need to build a screen scraper engine. A simple one is to use the WebClient (code behind .net) class which can help you make a http request to the page you need. The response contains the html or text. You then just need to parse that html by searching for a text pattern.

You could also do the same using ajax (jquery). Download the html load it in the dom. This can allow you to use jquery to get the element (div/table etc) you are targeting. The trick in this approach is to only display the innerHtml/text of the element you need and discard the rest of the document.

hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900