<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MYNITOR.COM &#187; PHP</title>
	<atom:link href="http://www.mynitor.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mynitor.com</link>
	<description>When the real business don&#039;t work out, make it a blog.</description>
	<lastBuildDate>Sat, 04 Sep 2010 22:09:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tools that help PHP Programmers</title>
		<link>http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/</link>
		<comments>http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 01:13:05 +0000</pubDate>
		<dc:creator>madiga</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.mynitor.com/?p=674</guid>
		<description><![CDATA[We&#8217;ve put together a list of 5 php helper tools that are available free of use.

Phing &#8211; PHing Is Not GNU make; it&#8217;s a PHP project build system or build tool based on  Apache Ant. You can do anything with it that you could do with a traditional build system like GNU make, and [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve put together a list of 5 php helper tools that are available free of use.</p>
<ol>
<li><a href="http://phing.info/trac/">Phing</a> &#8211; <strong>PH</strong>ing <strong>I</strong>s <strong>N</strong>ot <strong>G</strong>NU make; it&#8217;s a PHP project build system or build tool based on <a href="http://ant.apache.org/"><span> </span>Apache Ant</a>. You can do anything with it that you could do with a traditional build system like GNU make, and its use of simple XML build files and extensible PHP &#8220;task&#8221; classes make it an easy-to-use and highly flexible build framework. Features include running PHPUnit and SimpleTest unit tests (including test result and coverage reports), file transformations (e.g. token replacement, XSLT transformation, Smarty template transformations), file system operations, interactive build support, SQL execution, CVS/SVN operations, tools for creating PEAR packages, and much more.</li>
<li><a href="http://xdebug.org/">Xdebug</a> &#8211; <span>helps you debugging your script by providing a lot of valuable debug information.</span></li>
<li><a href="http://www.phpunit.de/">PHPUnit</a><span> &#8211; Test unit framework for PHP.</span></li>
<li><a href="http://propel.phpdb.org/trac/">Prope</a><span>l &#8211; an open-source  <a href="http://en.wikipedia.org/wiki/Object-relational_mapping"><span> </span>Object-Relational Mapping</a> (ORM) library written in PHP5, written on top of PDO. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data. Propel allows web application developers to work with databases in the same way they work with other classes and objects in PHP.</span></li>
<li><a href="http://www.phpmyadmin.net/home_page/index.php">phpMyAdmi</a><span>n &#8211; a free software tool written in <a href="http://php.net/">PHP</a> intended to handle the administration of <a href="http://mysql.com/">MySQL</a> over the World Wide Web. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface  (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement.</span></li>
</ol>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d674').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d674" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/&amp;submitHeadline=Tools+that+help+PHP+Programmers&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/&amp;title=Tools+that+help+PHP+Programmers" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/&amp;title=Tools+that+help+PHP+Programmers" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/&amp;title=Tools+that+help+PHP+Programmers" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/&amp;bm_description=Tools+that+help+PHP+Programmers" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/&amp;T=Tools+that+help+PHP+Programmers" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/&amp;title=Tools+that+help+PHP+Programmers" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/&amp;title=Tools+that+help+PHP+Programmers" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Tools+that+help+PHP+Programmers+@+http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/&amp;t=Tools+that+help+PHP+Programmers" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d674').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d674').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.mynitor.com/2010/04/28/tools-that-help-php-programmers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>15 methods to boost your PHP based website&#8217;s performance</title>
		<link>http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/</link>
		<comments>http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 04:02:53 +0000</pubDate>
		<dc:creator>madiga</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[caching]]></category>

		<guid isPermaLink="false">http://www.mynitor.com/?p=641</guid>
		<description><![CDATA[PHP is great for writing quick dynamic stuff for your website. Just a couple of lines of code can be written in 2 mins to insert or retrieve data from db. But with ease there is also some pain&#8230; the downside is that each request for a dynamic page can trigger multiple db queries, processing [...]]]></description>
			<content:encoded><![CDATA[<p>PHP is great for writing quick dynamic stuff for your website. Just a couple of lines of code can be written in 2 mins to insert or retrieve data from db. But with ease there is also some pain&#8230; the downside is that each request for a dynamic page can trigger multiple db queries, processing of output, and finally formatting to display on browser. This process can eventually be slow on larger sites or slower servers.</p>
<p>In this article, we&#8217;ve put together the list of caching plugins and techniques which can be used to improve your website performance.</p>
<ol>
<li> <a href="http://www.addedbytes.com/articles/caching-output-in-php/">Caching output in PHP</a> &#8211; Caching of output in PHP is made easier by the use of the output buffering functions built in to PHP 4 and above.</li>
<p></p>
<li><a href="http://www.theukwebdesigncompany.com/articles/php-caching.php">PHP Caching to Speed up Dynamically Generated Site</a>s &#8211; Instead of regenerating the page every time, the scripts running this site generate it the first time they&#8217;re asked to, then store a copy of what they send back to your browser. The next time a visitor requests the same page, the script will know it&#8217;d already generated one recently, and simply send that to the browser without all the hassle of re-running database queries or searches.</li>
<p></p>
<li><a href="http://us.php.net/apc">Alternative PHP Cache</a> &#8211; A free and open opcode cache for PHP. It was conceived of to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.</li>
<p></p>
<li><a href="http://acme-web-design.info/php-cache-kit.htm">PHP-Cache-Kit</a> &#8211; Dramatically speed up your site with this easy-to-use PHP caching kit. A slim little PHP class which allow you to quickly and easily implement module-level caching into your PHP projects.</li>
<p></p>
<li><a href="http://unearth.sourceforge.net">Unearth PHP Cache Engine</a> &#8211; A flexible, easy-to-use system for caching PHP pages. It is really intended to cache a series of parts of a single page independently, each with its own refresh requirements. Caching of this sort can dramatically decrease page rendering time.</li>
<p></p>
<li><a href="http://stefangabos.blogspot.com/2007/03/zebra-php-framework-php-cache-class.html">PHP Cache Class</a> &#8211; A PHP class that caches output generated by PHP files and uses the cached version instead of generating the content again and again. Cache files expire after a specified amount of time.</li>
<p></p>
<li><a href="http://www.php-accelerator.co.uk/">PHP Accelerator</a> &#8211; A plugin PHP Zend engine extension that provides a PHP script cache and is capable of delivering a substantial acceleration of PHP scripts without requiring any script changes, loss of dynamic content, or other application compromises.</li>
<p></p>
<li><a href="http://cesars.users.phpclasses.org/browse/package/3972.html">gCache</a> &#8211; A PHP class that can be used to capture and cache Web page content. It can store cached content in files of a given directory.</li>
<p></p>
<li><a href="http://skycache.pureftpd.org/">Skycache</a> &#8211; A free, lightweight, and fast page cache for PHP 4 and PHP 5. Once a dynamic page has been computed, it is stored in a page cache. If a query for the same URL is made afterwards, the content is immediately served from the cache instead of processing the script again. The end result is a significant speedup and a slightly reduced server load.</li>
<p></p>
<li><a href="http://eaccelerator.net">eAccelerator</a> &#8211; A further development of the mmcache PHP accelerator and encoder. It increases the performance of PHP scripts by caching them in a compiled state, so that the overhead of compiling is almost completely eliminated.</li>
<p></p>
<li><a href="http://www.ake.nu/software/phpffc/">PHP FastFileCache</a> &#8211; Caches output from dynamic PHP scripts, and stores them in files for fast retrieval under high server load. It supports a global timeout setting for maximum cache age, as well as per-file timeout overrides. It also implements file locking, to prevent data corruption and unnecessary processing.</li>
<p></p>
<li><a href="http://www.andrewsw.com/pages/CacheIt">CacheIt</a> &#8211; A PHP class designed to facilitate caching.</li>
<p></p>
<li><a href="http://turck-mmcache.sourceforge.net/">Turck MMCache for PHP</a> &#8211; A free PHP accelerator, optimizer, encoder, and dynamic content cache. It increases performance of PHP scripts by caching them in a compiled state, so that the overhead of compiling is almost completely eliminated.</li>
<p></p>
<li><a href="http://www.tinybutstrong.com">TinyButStrong</a> &#8211; A template class for PHP that allows you to generate HTML pages using MySQL, PostgreSQL, SQLite in native, and any other databases.</li>
<p></p>
<li><a rel="bookmark" href="http://blog.lxpages.com/2007/04/05/boost-website-performance-in-15-seconds/"> </a><a href="http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/">Boost website performance in 5 seconds!</a> &#8211; Not exactly caching but simple enough to implement a quick fix.</li>
<p>
</ol>
<p>Did we miss something?  Please let us know in the comment area.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d641').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d641" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/&amp;submitHeadline=15+methods+to+boost+your+PHP+based+website%26%238217%3Bs+performance&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/&amp;title=15+methods+to+boost+your+PHP+based+website%26%238217%3Bs+performance" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/&amp;title=15+methods+to+boost+your+PHP+based+website%26%238217%3Bs+performance" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/&amp;title=15+methods+to+boost+your+PHP+based+website%26%238217%3Bs+performance" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/&amp;bm_description=15+methods+to+boost+your+PHP+based+website%26%238217%3Bs+performance" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/&amp;T=15+methods+to+boost+your+PHP+based+website%26%238217%3Bs+performance" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/&amp;title=15+methods+to+boost+your+PHP+based+website%26%238217%3Bs+performance" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/&amp;title=15+methods+to+boost+your+PHP+based+website%26%238217%3Bs+performance" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+15+methods+to+boost+your+PHP+based+website%26%238217%3Bs+performance+@+http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/&amp;t=15+methods+to+boost+your+PHP+based+website%26%238217%3Bs+performance" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d641').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d641').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.mynitor.com/2010/02/03/15-methods-to-boost-your-php-based-websites-performance/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Increase your website performance in under 5 seconds!</title>
		<link>http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/</link>
		<comments>http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 06:01:58 +0000</pubDate>
		<dc:creator>madiga</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[cache]]></category>

		<guid isPermaLink="false">http://www.mynitor.com/?p=457</guid>
		<description><![CDATA[All websites seem to have some sort of dynamic feature which means it probably makes a backend call to a database like mysql to retrieve and display data. In my case, I have a website that displays top 20 most voted names or some other random data on front page of my website.
So every time [...]]]></description>
			<content:encoded><![CDATA[<p>All websites seem to have some sort of dynamic feature which means it probably makes a backend call to a database like mysql to retrieve and display data. In my case, I have a website that displays top 20 most voted names or some other random data on front page of my website.</p>
<p>So every time a user hits index.php, my code makes a db call to get this statistical data. When traffic increased, my server performance took a nose dive and I had to raise mysql max connections to support the number of hits it was getting for each user visit but I was only prolonging and avoiding the issue.</p>
<p>So i figured, why not convert the front door to static html instead?  I renamed index.php (dyanmic version) to index2.php and wrote the following shell script:</p>
<pre>
#!/bin/bash
cd /home/httpd/vhosts/&lt;www.mywebsite.com&gt;/httpdocs
wget -O temp.index.php --timeout=60 http://www.mywebsite.com/index2.php
if [ "`stat -c%s temp.index.php`" -gt 500 ]
then
    cp temp.index.php index.php
else
echo "Cached size too small"
exit 0
fi
</pre>
<p>The value of &#8216;500&#8242; above means if file size for temp.index.php is greater, then it&#8217;s legitimate otherwise something happened and wget failed.  I saved the above script to a file named  /bin/cache_main.sh.  </p>
<p>And created a crontab entry that would republish index.php every 5 minutes:</p>
<pre>*/5 * * * *      /bin/clear_main.sh &gt; /dev/null 2&gt;&amp;1</pre>
<p>So with the above setup, the cron runs every 5 minutes hitting index2.php (dynamic version of the site) and generates index.php, static version.  Users coming in to the site always gets the index.php served which is 100% static.  The data of course will be 5 minutes old but I don&#8217;t mind this trade-off at all.</p>
<p>It definitely beats changing code to support caching or buying new hardware to support traffic spike.  You use this same method for other db intensive pages on your site just as easily.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d457').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d457" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/&amp;submitHeadline=Increase+your+website+performance+in+under+5+seconds%21&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/&amp;title=Increase+your+website+performance+in+under+5+seconds%21" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/&amp;title=Increase+your+website+performance+in+under+5+seconds%21" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/&amp;title=Increase+your+website+performance+in+under+5+seconds%21" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/&amp;bm_description=Increase+your+website+performance+in+under+5+seconds%21" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/&amp;T=Increase+your+website+performance+in+under+5+seconds%21" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/&amp;title=Increase+your+website+performance+in+under+5+seconds%21" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/&amp;title=Increase+your+website+performance+in+under+5+seconds%21" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Increase+your+website+performance+in+under+5+seconds%21+@+http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/&amp;t=Increase+your+website+performance+in+under+5+seconds%21" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.mynitor.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d457').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d457').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.mynitor.com/2009/12/16/increase-your-website-performance-in-under-5-seconds/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
