Jump to content


How to generate HTML file from PHP code

  • Please log in to reply
1 reply to this topic

#1 never_rain

  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 10 August 2006 - 03:43 PM


I am developing an article based website. I want each article to be indexed in search engines. My URL becomes like this.

http://www.pbm-biz.c...=3&&title=Human Psychology

I want this page to be saved in this way.


My first Question is, Is this the right approach ?
If yes, How to generate the HTML file with each article. Any link to knowledge base is welcome or personal experience is also appreciated.

If this is not the right approach, what is the best thing to do.

I really appreciate your help and anxiously waiting for your reply.



Faisal Niaz[br]Digitalspot Solutions

#2 SharkBait

  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 10 August 2006 - 03:56 PM

Last I remembered.. search engines do index pages that are generated via databases.  Though I do understand that actual .html files would be easier for it to be crawled.

I think it's fwrite() you want to look at if you're wanting to create the actual .html file. Just output the code to variables and then write those to the file.

I do know there have been people to do what you want.  I just can't remember where/how they did it, but I know it can be done. You have to parse the URL for the file you wish to serve.  Where mydomain.com/article/ThisThing101/1 usually meant something like mydomain.com/article.php?name=ThisThing101&page=1

Sorry I could not be any more help.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users