<% Sub CreateHTMLPage(getURL,postFile) '################################################### '# change the variables below to match your site # '################################################### 'replace "getSite" variable to the address of your site 'get complete URL of the active file you want to run Dim getPage getPage = "http://www.yoursite.com" & getURL 'replace "postSite" to the physical address of your site 'make composite physical address of the "HTML" file you want to write to Dim postPage postPage = "C:\Inetpub\wwwroot\mysite" & postFile '################################################## '# end changes # '################################################## 'variables for "ASPTear" component Const Request_POST = 1 Const Request_GET = 2 'initiate component "ASPTear.dll" Dim TearObj Set TearObj = CreateObject("SOFTWING.ASPTear") Response.ContentType = "text/html" 'Note on above line: you can actually skip it if 'your asp file has a similar declaration in its HEAD part Dim strRetrieval strRetrieval = TearObj.Retrieve(getPage, Request_GET, "", "", "") 'in case of error getting the page, output error If Err.Number <> 0 Then Response.Write "<b>" If Err.Number >= 400 Then Response.Write "Server returned error: " & Err.Number Else Response.Write "Component/WinInet error: " & Err.Description End If Response.Write "</b>" Response.End End If Set TearObj = Nothing 'write to file... Dim objFile, objTStream Set objFile = Server.CreateObject("Scripting.FileSystemObject") Set objTStream = objFile.OpenTextFile(postPage, 2, True, 0) objTStream.Write(strRetrieval) Set objTStream = Nothing Set objFile = Nothing End Sub %>