Grabbing Information from Other Web Servers

One of the most frequent questions I hear from ASP developers is “How can I grab information from another web server?” Specifically, they’re interested in the HTML generated by a particular URL, be it a static web page or an ASP page.

There are many reasons a developer may be interested in using an ASP page to obtain a web page fresh from another server. One of the most popular reasons is to obtain some real-time data. For example, several of the portals maintain updated stock quotes and weather information. Many developers would like to be able to snatch this information and display it on their own web page.

Tip

Many sites that provide weather or stock information have the actual temperature or quotes in a specific column and row in an HTML table. An excellent article on 4GuysFromRolla.com, “Grabbing Table Columns From Other Web Pages,” by Thomas Winningham, presents an application to quickly and easily grab a particular column and row from an HTML table residing on a different web server. The article is available at: http://www.4guysfromrolla.com/webtech/031000-1.shtml.

To grab information from a web page, we need look no further than to Stephen Genusa’s excellent set of objects. The ASPHTTP object, available for $49.95 at http://www.serverobjects.com/products.htm#asphttp, allows developers to download HTML content from another web server. Furthermore, while using ASPHTTP, you can save the downloaded content to a file if you so choose! ...

Get Designing Active Server Pages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.