|
Includes - Other Sites/Dynamic FileNames
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.
filename=/learn/test/asphttpother.asp
<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.
filename=/learn/test/asphttpdynamic.asp
<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>
 |  |  |
 |
There are many worthy charities!!. But perhaps help starving children in Africa or South America AND help Charles too.
a $5 tip buys him lunch at McDonalds,
a $20 tip buys his kid Hitoshi a new computer game,
a $39 tip buys his daughter Michiko a few nice outfits.
See our donor list.
|  |
 |  |  |
|
|
|
|