SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru Angry Coder's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How can I generate a static version of huge databased site?

    Hello,

    I have a huge database of articles and books (around 25 MB). It works fine but for some reason I want to generate an HTML version of it.

    What is the best and easiest way to accomplish this task?

    Your help is this matter is greatly appreciated.
    Why It Doesn't Work?!

  2. #2
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If all pages on your site are linked, the easiest way would be to use a grabber tool like wget.

  3. #3
    SitePoint Guru Angry Coder's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation

    Thanks for your reply.

    Yes, they're linked... What's wget?
    Why It Doesn't Work?!

  4. #4
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or just make a script to save all the dynamic pages with an html extension.
    Mike
    It's not who I am underneath, but what I do that defines me.

  5. #5
    SitePoint Guru Angry Coder's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK. I think you mean this one:

    http://www.gnu.org/software/wget/wget.html

    But it seems difficult a bit, and I have the site on my localhost! (Apache 2/Win XP).
    Why It Doesn't Work?!

  6. #6
    SitePoint Wizard Sillysoft's Avatar
    Join Date
    May 2002
    Location
    United States :)
    Posts
    1,691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well sounds like a caching template is needed or a spider.

    Caching:
    When a person accesses a dynamic page, save the page to a file in a directory and when they reaccess the same dynamic page have it check to see if the cached page is there or not. If so then load the cached/static page.

    Spider:
    In simple usage you can use file_get_contents to grab the html code from your dynamic pages and save it to a static file. You will first need to have a link spider grab the links from your site and then grab the html and put it into a file.

    On a side note a 25 meg database is very small.

    Edit: Re-reading your post Im a little confused. Do you already have an html page that dynamically displays the database info?

    Silly


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •