Closed Thread Icon

Topic awaiting preservation: Novice Help Please (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=13017" title="Pages that link to Topic awaiting preservation: Novice Help Please (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Novice Help Please <span class="small">(Page 1 of 1)</span>\

 
g-ma
Nervous Wreck (II) Inmate

From:
Insane since: Dec 2003

posted posted 12-15-2003 03:25

Is there a way to create an html version of a dynamically created php site? These pages are created from an sql database through queries in a php form. Maybe a script of something? I need to place an html version of it on a cdrom to give to people.


Thank you ahead of time,


G

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 12-15-2003 04:36

Now you know why all the major sites (which are db driven) create static HTML or use URL Rewriting as oposed to dynamic ones with query strings, and use a nice google site search tool to allow users to find specific content.

For a question like this you will have to supply some further information, (i.e. what your form values are, maybe a link to the site in question).

Since it is totally dynamic without having rewritten static/dynamic urls you are in some trouble here. The general way to go about this will require a script of some kind.

With a guess I would say you could do this with a php page. You would select all possible values from the database and one by one open a file and output the raw HTML data to the file as opposed to the PHP data. This will give you all your pages via your data. Then you have to decide how you want to allow access to this data, this means a new way to navigate around.

Now that you have static pages and a new way to navigate around, you might want to turn this script into a cron job and schedule it to run at say 3:00am every day and switch to your new navigation. Now you have a database driven site that has static HTML pages with the data.

This would then allow you the bonus of:
- having all your pages index by search engines
- saving on server overhead
- allowing users nicer URL to reach specific content

Good luck with this one, if you need more help post more info.

-Dan-

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 12-15-2003 04:55

WM: I think you missed the critical bit:

quote:
I need to place an html version of it on a cdrom to give to people.



Question also asked at the GN:
http://development.gurusnetwork.com/discussion/thread/2413/

where I've thrown in my answers.

___________________
Emps

The Emperor dot org

g-ma
Nervous Wreck (II) Inmate

From:
Insane since: Dec 2003

posted posted 12-15-2003 08:47

Right now it is a work in progress but I will let you look:
http://www.sldjyellowpages.com/yellow

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 12-15-2003 17:10

Emps,
My first inclination was to do as you said to use an offline browser, but this solution falls short in that the offline browser will grab all of the linked content. But it will not grab the dynamic content which is loaded via the Yellowpages form. The advice I offered is the first step in the process. To place the dynamic content into a position to be placed on a CD it needs to be put into a static format, which would require that static pages be created so that a webpage grabber can access the pages.

You are correct in that I forgot to mention the critical aspect that you sugested.

-Dan-

g-ma
Nervous Wreck (II) Inmate

From:
Insane since: Dec 2003

posted posted 12-16-2003 00:16

IS there an easy way to do such a thing other than each page by hand?

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 12-16-2003 04:35

You may want to try taking exporting the data stored in the relational database into an xml file (file1). Then write an HTML page that includes an iframe. Populate the iframe with a second xml document(file2) that gets an XQuery added to it(firstChild.nodeValue) by means of javascript and user input from the HTML page. This file2.xml will use the XQuery to pull the specific info. needed from file1.xml.

Or use another approach and substitute an external javascript file to hold the database info in multidimentional arrays. Then when the user submits a query, call a function that writes the correct data to the page using firstChild.nodeValue or innerHTML

Either way you fit everything on the cd, and don't have to write a page for every possible user request.


hmm........




/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

« BackwardsOnwards »

Show Forum Drop Down Menu