O'Reilly logo

Designing Active Server Pages by Scott Mitchell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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! ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required