PDA

View Full Version : convert asp pages to html?



mountainbuilder
01-11-2005, 09:44 PM
hey everyone - looking for a tool that will visit every single dynamic page on a site and automatically "save as" to a static html page.

my goal in this is to create a sitemap that has links to every product page in static format so all spiders can see every one. also will have the effect of appearing to double the size of my client's site.

note: i'm familiar with the software that will dynamically change the links to be static links, but i'm not interested in that....would prefer to have individual files.

best wishes,
brooks

MHenscheid
01-14-2005, 02:13 PM
I don't know if this is the best way to do this, but I have used the MSXML2.ServerXMLHTTP (a standard XML compononent) to "load" web pages within the script and to get the whole page content (static content as it would appear to any browser).

Once you have the page content you can use the fileSystem Object to save the data to a new file.

I haven't looked at it for a while, but here is some of the code for viewing the pages within the script:



set http_obj=createObject("MSXML2.ServerXMLHTTP")
call http_obj.Open("GET","http://www.domain.com/webpage.asp",true)
http_obj.send
On Error Resume Next
If http_obj.readyState <> 4 then
http_obj.waitForResponse 10 'wait for 10 seconds
End If
If Err.Number = 0 then 'no error occured
If (http_obj.readyState <> 4) Or (http_obj.Status <> 200) Then 'ensure all data (4) was recieved from a successful page load (200)
'Abort the XMLHttp request
http_obj.Abort
runNavSideXML="ABORT"
Else
runNavSideXML=http_obj.responseText
end if
else
runNavSideXML="ERROR"
end if