Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 21-07-2009
Member
 
Join Date: Aug 2008
Posts: 69
How to generate static html page with PHP?

Hi,

I am working on my new website in PHP.
I am not sure how to create a static HTML webpage in PHP for the most recent 15 topics. I mean I want a mechanism that can generate static HTML pages & show the top/recent 15 topics. I have seen this on many sites.I just want to know how to create a static html page in PHP? I want to reduce the server load.

Thanks in advance.
Reply With Quote
  #2  
Old 21-07-2009
Member
 
Join Date: May 2008
Posts: 29
Re: How to generate static html page with PHP?

Hi,

You need to write some simple PHP scripts, you can prepare a CRON & have it automatically update your website at specific time intervals. You can use the CRON job to query the Database that will go in the static page. The databse query is what you need. USe the PHP file function to create a new file & then parse the database result into your desired form say XML.
I hope this helps.
Reply With Quote
  #3  
Old 21-07-2009
Member
 
Join Date: Oct 2008
Posts: 79
Re: How to generate static html page with PHP?

When you are running a large volume website that requires alot of mysql_query action you'll probably want to consider ways to reduce the impact of your server's performance. Always go for static HTML pages because, our visitors get pages which load real fast, your hosting bill goes down and server is now able to handle more queries without choking and static HTML pages whose contents keep changing matters more.

Static HTML Generation With PHP

When you are running a large volume website that requires alot of mysql_query action you'll probably want to consider ways to reduce the impact of your server's performance. We can do this by generating static html pages from the pages that require all of these queries. By writing a few simple PHP scripts you can prepare to CRON your PHP driven site and have it automatically update for you at set intervals. Or you can have direct control over the updates via your web browser. This makes your website run alot faster and reduces your MySQL database queries dramatically.
Reply With Quote
  #4  
Old 21-07-2009
Member
 
Join Date: Aug 2008
Posts: 69
Re: How to generate static html page with PHP?

Hey guys Thanks for the prompt reply.

I will definitely have a look at your guidelines. Ill post & bug you if I find any problem generating such static html pages. Well said Corona, Search engine loves static pages more since they keep on updating the data.

Thanks again.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to generate static html page with PHP?"
Thread Thread Starter Forum Replies Last Post
Differentiation between static web page and a dynamic web page Sheena_thakkar Software Development 3 07-12-2009 08:21 AM
How to jump down in a Html page Ron1 Software Development 2 13-06-2009 06:14 PM
How to embed a WMV into an html page Ameyaa Software Development 2 19-05-2009 10:37 AM
How do i Auto-generate HTML File Index Dharmesh Arora Software Development 2 23-04-2009 03:18 PM
Generate an ASP page a password of 8 characters strong christheart Software Development 3 03-04-2009 11:45 AM


All times are GMT +5.5. The time now is 08:46 PM.