February 9th, 2006, 03:26 AM
Generating static html pages
I need some help with a project a client wants. He wants a catalogue of products - in effect a "mother" webpage that lists all types of products available and "child" webpages that are static html pages and which will give the details of each product. He wants that the "mother" have a form to add product details and that these details be translated into a static html page when submitted. If I code the "mother" in php, is there a tool available to automatically create static html pages on the fly like this?
I hope I have made my issue clear.
February 9th, 2006, 04:05 AM
...why? is his/her server load so high that static content is required?
Anyway, Phunami will spider your site and generate static pages, otherwise add something to the upload/edit form that creates a static page ( shouldn't be too hard - I'd wget/curl the non-static page, and save the html in the static location ).
What language do you want to implement this in & I'll move this thread there.
February 9th, 2006, 04:31 AM
well, in php it's fairly easy
capture the output you would normally print to screen like so
//echo some crap here
$data = ob_get_contents();
then print $data into a static file.
February 9th, 2006, 07:58 PM
Thank you for your help.
I intend to do this in php. Had started in that forum, then thought that this would be a better place to get answers should the solution be a non-php one.
February 9th, 2006, 08:00 PM
Ok, I'll move it in there ( although, yes this could be done in any language, but if php's the one you're familiar with, you should go with it). You might want to post some specifics of what you're trying to do etc.
Last edited by SimonGreenhill; February 9th, 2006 at 08:03 PM.
February 9th, 2006, 08:02 PM
Like I said, what I primarily want to do is submit a form and then be able to generate a static html based on the information I have submitted.
February 15th, 2006, 02:01 PM
why does your client care whether static html pages are used - what's it to them? The form could just as easily add a record to the database and you would have fewer problems with editing/maintaining the data. They don't need to give you the spec to this level of detail, since it adds no value to him and has no effect on the user experience. Write your php files with a html extension, tell your webserver to parse them as php and charge him extra for the technical genius involved with created static pages on the fly ;-)
Originally Posted by leonardjensan
March 8th, 2006, 10:42 AM
If I understand you correctly, your client wants to be able to enter a description, graphics, etc. into a browser-based "form" and generate a page from it that can then be delivered from a website/intranet/catalogue whatever.
Along with everyone else, I have to wonder at the motivation behind this - If your client wants dynamic generation of web-pages, why on Earth don't they deliver dynamic pages in the first place?