3rd party components like ASPHTTP can grab the HTML contents of a specific URL into an ASP string. Supports GET/POST/HEAD documents via the HTTP protocol, examining response headers, transfering requests to a file (including binary transfers) and password authentication support. They can also be used on YOUR OWN SITE to make dynamic includes possible.
available at http://www.serverobjects.com/products.htm
Microsoft includes WinInet which seems to be ideally suited for this EXCEPT is currently not thread safe, see:
http://www.learnasp.com/advice/threadsafe.asp
so Tools like ASPHTTP are a necessity.
Here is a sample where ASPHTTP is used to grab contents from another site.
<Test Script Below>
<html><head>
<title>asphttpother.asp</title>
</head>
<body>
<%
Set HttpObj = Server.CreateObject("AspHTTP.Conn")
HttpObj.Url = "http://www.funinspace.com"
strResult = HttpObj.GetURL
STRresult=server.htmlencode(STRresult)
response.write STRresult
SET HTTPobj = nothing
%>
</body>
</html>
Here is a sample where ASPHTTP is used to allow a string to decide which page on our site is executed.
<Test Script Below>
<html><head>
<title>asphttpdynamic.asp</title>
</head>
<body bgcolor="#FFFFFF">
<%
mystring="/learn/test/response.asp"
Set HttpObj = Server.CreateObject("AspHTTP.Conn")
HttpObj.Url = "http://www.learnasp.com" & mystring
strResult = HttpObj.GetURL
response.write STRresult
SET HTTPobj = nothing
%>
</body>
</html>
