Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.


Results 1 to 10 of 10

Thread: PHP to HTML

  1. #1

    PHP to HTML

    can anyone help me to understand what my approach should be? I have some data in MySQL and can generate it into a page via PHP fine, but I would like to have PHP build an HTML version of the page every night to increase my search rankings.

    In other words, I would like to run a PHP script (behind the scenes) every night which generates an HTML page that users interact with statically.

    Does anyone know a good place to start?

  2. #2
    well, build the script, then do some googling on "cron job", that should do the trick and keep you busy for a while.

    member #1 of the "XML-is-a-crutch-to-make-people-feel-elite-club"
    K-Emmys-06: Best Quote K-Emmys-06: Flash Genious

  3. #3

  4. #4
    I was kinda wondering that myself

    member #1 of the "XML-is-a-crutch-to-make-people-feel-elite-club"
    K-Emmys-06: Best Quote K-Emmys-06: Flash Genious

  5. #5
    I worked on a project once where a big company HTMLized all of their pages for SEO. I was trying to apply the same thing here. Does it not make a difference? I thought Google cant read DB.

  6. #6

  7. #7
    Making an HTML version of a PHP page won't make any difference in terms of Search Engines, but if you have a lot of continually growing data in a db, then automatically creating fresh, relevant content will definately help.

  8. #8
    ^ well, that depends. i mentioned mod_rewrite because search engines are known to only pick up 1 or 2 variables from the url. so if your url is mysite.com?var1=one&var2=two&var3=three&var4=four , then the searchbot might crap out after var2. but if you use search friendly URLs, it would come out something like mysite.com/one/two/three/four

    to answer peter's question from before, no search engines can't directly access your db. they can only access what you make public. so they can see the HTML output of your server-side scripts.

  9. #9
    Hi petermdenton,

    I used this little trick last week, check the project minigal (mg2) at minigal dot dk, it has a nice setup which generates the html data. I believe that, in combination with file_get_contents and eval, you might be able to write your own script that, given a directory, recursively generate the html page of the php data.

    If you are curious about how to use file_get_contents and eval to put the php into html, check this tutorial:

    www dot planet-source-code dot com/vb/scripts/ShowCode.asp?txtCodeId=1433&lngWId=8


    Best Regards,


  10. #10


    Thank you so much for the help!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012