Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export ASP / SHTML to HTML static pages...

Status
Not open for further replies.

WartookMan

Technical User
Nov 24, 2003
346
AU
I've searched the forums, I've searched the web, but I don't seem to be able to find a tool or information on this problem.

Background:
I have two websites, one commercially hosted which allows CGI scripting and SSI (.shtml files), and another that is a basic service ([ignore]www.servername.com/~mysite[/ignore]) which only allows static HTML files.

From the looks of it, SHTML appears to represent a similar style to ASP files - in that you can include static text and dynamic code.

Questions:
Is it possible to export an ASP file to static HTML file?
Is it possible to export an SHTML file to a static HTML file?

I'm thinking I can probably write an HTTP connector to read the .asp files and store the response as an .html version using either ASP or some other server side / Java application.

The reason I thought of using ASP, is that I have an IIS server I can use for development work.

Any thoughts / ideas / suggestions would be greatly appreciated (or even a thread that I have over-looked).

Pete.


Web Developer / CMS (Aptrix / LWWCM) Consultant
w: e: Pete.Raleigh(at)lclimited.co.uk
 
Just out of curiosity, why would you want to store these as static pages?

If the pages are dynamically generating content then your going to run into a great deal of problems when you have 15 versions of the same page, have to name them something different, then have to go and change all the links to connect to the right version of the page with the right content on it. I have seen a few posts in the past on this subject and generally what we try to do is find another solution that won't be halfway as evil to implement. If you care to share the purpose behind this maybe we can help you find a good solution to it as well.

-T

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
As I said in my original post:
"...I have two websites, one commercially hosted which allows CGI scripting and SSI (.shtml files), and another that is a basic service ([ignore]www.servername.com/~mysite[/ignore]) which only allows static HTML files..."

Both of these sites are identical (apart from the domain name and thus the server they reside on). One is in the United States, the other is in Australia.

At the moment, the sites are hand-coded using HomeSite. No server generated dynamic content.

Therefore, I would like to EITHER:
A) Create a solution for the commercially hosted site (running Apache in the US) using SSI (.shtml) files, export these to static pages using CGI/Perl scripting, and then FTP the resultant pages for use on the Australian site.
OR
B) Create a solution in ASP, export these to static pages using ASP server side scripting, and then FTP the resultant pages for use on both the US and Australian site.

One site is a .com (US) and the other is a .com.au (Aus) domain.

If / when I need a new copy generated, I can simply modify the appropriate #include file (or server CGI script) and export a new copy - ready to FTP to the Australian site.

The ASP solution would be preferable, since I can do that on my local machine at home and test locally, without having to upload/re-upload an export script to test for errors.

How would I go about creating an HTTP Connector to retrieve webpages in ASP? I don't mind "hard-coding" the list of pages to retrieve as a "site-map".

Pete.


Web Developer / CMS (Aptrix / LWWCM) Consultant
w: e: Pete.Raleigh(at)lclimited.co.uk
 
Ok, I missed the location difference, I was thinking you just had two similare sites in differant formats and wanted to combine, not duplicate across.

If you wanted to do this as an ASP page (or even as a .vbs VBScript file) you could use the XMLHTTP object to pull in the HTML from a target address, then save the content out using the FileSystemObject to a local HTML file. At that point you can either take the route of ftp'ing the files up by hand or you can get a 3rd party component like ASPInet to ftp files directly from your script/page. (ASPInet is a free ftp component from
-T

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
I have an older IIS server providing departmental information.

My solution to this was to use scripts to access database, and then create .shtml files or include files

I use VBScript or Javascript, and trigger them using cscript scriptname via a Taskscheduler job.

If you would use this approach, then you could create the files and from within the script ftp the file(s) to the remore server(s) as needed from your development box.

To be sure the same could be done with perl or some other scripting language.

HTH



DougCranston
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top