Hi

I have spent a few days searching the web and have as yet found no adequate tutorials/solutions to my problem:

I work for a large website with thousands of pages. Much of the information is duplicated across the site for different partners but is updated regularly. I wanted to separate the information from the pages and use php to pull it in. However, the load on the server would be high and I need the pages in static html for search engine optimisation. Instead I plan to hold the information on an in-house development server (maybe in xml format?) and then write a php script which will grab the required information and put into static html pages which I will then upload as required. The information will be in the form of a header, left_navs, content and footer.
1. How would the php know what information goes with what pages?
2. How can I pull in various bits of information and place them in the right parts of each page?
I'm sure this is possible, but don't have any idea of how to do it. I'm new to php so please explain as simply as possible.

Thanks

    Use a database to store the information and templates to format/present the information.

    Then instead of using php live set up a cron job that reuns on a scheduled bases (like everynight) to generate and upload the pages.

      The only thing I have to add is that you could have thr cron job make html pages instead of php pages. If they are not live then there is no need to have the .php extension which search engines assume is generally live. Otherwise I concur.

      I would use PHP to create the static html.

        Thanks for the help, however I had come to that conclusion already. What I was trying to ask for, although I worded it badly, was:

        An idiots guide on how to create a script on the dev server which takes the php pages (on the dev server), processes the embedded php script and spits out the results as html (still on the dev server) ready to be checked before they are uploaded to the live site.

        Thanks

          That is a pretty big script, why not start working on it and when you run into a specific spot you need help with then post more specific questions.

          You can get most of what you need from tutorials

          First you'll need to know how to use a database with php

          Then you'll need to know how to use templates with php.

          Then you'll need to know how to create files with php.

          Then you'll need to know how to ftp with php.

            Hi again

            Does anyone know how to keep the directory structure the same when generating html from php. The html is going to be generated from php files in a set directory structure, into the same directory structure, but on a different port.

            ie
            port :80
            /directory1/directory2/file.php

            to
            port: 81
            /directory/directory2/file.html

            Thanks

              Write a Reply...