<?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>PHP Trivandrum &#187; php tips</title>
	<atom:link href="http://www.php-trivandrum.org/tag/php-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.php-trivandrum.org</link>
	<description>Get addicted to PHP</description>
	<lastBuildDate>Fri, 27 Jan 2012 03:19:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Class DumpIO &#8211; Inspired by Apache mod_dumpio but reluctant to restart webserver</title>
		<link>http://www.php-trivandrum.org/code-snippets/class-dumpio-inspired-by-apache-mod_dumpio-but-reluctant-to-restart-webserver/</link>
		<comments>http://www.php-trivandrum.org/code-snippets/class-dumpio-inspired-by-apache-mod_dumpio-but-reluctant-to-restart-webserver/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 03:16:47 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[dumpio]]></category>
		<category><![CDATA[php tips]]></category>
		<category><![CDATA[script logging]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/?p=1112</guid>
		<description><![CDATA[Though there are far and wide systems for live debugging, and the sort, for forensic or load analysis, our php-extjs framework did not have anything pre planned, other than some query loggers, and background processing systems to log into db etc. While recently the Master MySQL server started showing variations in the cacti patterns (normal [...]]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/code-snippets/class-dumpio-inspired-by-apache-mod_dumpio-but-reluctant-to-restart-webserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Function to format bytes in human readable format</title>
		<link>http://www.php-trivandrum.org/code-snippets/function-to-format-bytes-in-human-readable-format/</link>
		<comments>http://www.php-trivandrum.org/code-snippets/function-to-format-bytes-in-human-readable-format/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 03:40:54 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[php snippets]]></category>
		<category><![CDATA[php tips]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/?p=1024</guid>
		<description><![CDATA[I was digging through my old codes to get this, still could not find. Hence when I wrote it, just made a note here such that later it wont be difficult to find atleast for me.

function&#160;formatSize($size){&#160;&#160;&#160;&#160;&#160;$units&#160;=&#160;array('&#160;B',&#160;'&#160;KB',&#160;'&#160;MB',&#160;'&#160;GB',&#160;'&#160;TB');&#160;&#160;&#160;&#160;&#160;for&#160;($i&#160;=&#160;0;&#160;$size&#160;&#62;&#160;1024;&#160;$i++)&#160;{&#160;$size&#160;/=&#160;1024;&#160;}&#160;&#160;&#160;&#160;&#160;return&#160;round($size,&#160;2).$units[$i];&#160;}
format filesize, php filesize human readable
]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/code-snippets/function-to-format-bytes-in-human-readable-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Formatted XML, the php dom way &#8211; Best for debugging</title>
		<link>http://www.php-trivandrum.org/code-snippets/formatted-xml-the-php-dom-way-best-for-debugging/</link>
		<comments>http://www.php-trivandrum.org/code-snippets/formatted-xml-the-php-dom-way-best-for-debugging/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 05:39:36 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[php snippets]]></category>
		<category><![CDATA[php tips]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/code-snippets/formatted-xml-the-php-dom-way-best-for-debugging/</guid>
		<description><![CDATA[Recently in a discussion on linkedin <a href="http://www.linkedin.com/e/vaq/16409486/40870/14053122/view_disc/">PHP webservice - Logging Requests/Responses</a>, Roy de Kleijn had asked "how can I print the XML in XML structure, in stead of a single line of text", which triggered me a thought.]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/code-snippets/formatted-xml-the-php-dom-way-best-for-debugging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic image sizing with static delivery &#8211; Wordpress Enhancement</title>
		<link>http://www.php-trivandrum.org/code-snippets/automatic-image-sizing-with-static-delivery-wordpress-enhancement/</link>
		<comments>http://www.php-trivandrum.org/code-snippets/automatic-image-sizing-with-static-delivery-wordpress-enhancement/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 19:31:36 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[php tips]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/?p=941</guid>
		<description><![CDATA[Recently I got fed up trying to convince the operators of a client, for whom we had implemented a wordpress site. The operators, even after we repeatedly asked to upload only relevant sizes for certian positions, were trying to make one size fit for all. Hell, places where thumbnails of 1 to 2K would suffice, [...]]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/code-snippets/automatic-image-sizing-with-static-delivery-wordpress-enhancement/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Speeding up Wordpress home page</title>
		<link>http://www.php-trivandrum.org/general-articles/speeding-up-wordpress-home-page/</link>
		<comments>http://www.php-trivandrum.org/general-articles/speeding-up-wordpress-home-page/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 18:33:26 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[General Articles]]></category>
		<category><![CDATA[php tips]]></category>
		<category><![CDATA[speedup php pages]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/general-articles/speeding-up-wordpress-home-page/</guid>
		<description><![CDATA[After about an year, since we launched Asianet News Portal the home page with all the complications had started to show a dead slow performance, and by using our Query Profiler, I could identify the bottleneck as the number of queries, and wordpress itself was telling the status as 48 queries in 6.344&#160; seconds. Now [...]]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/general-articles/speeding-up-wordpress-home-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Paged Navigation &#8211; My own way</title>
		<link>http://www.php-trivandrum.org/code-snippets/paged-navigation-my-own-way/</link>
		<comments>http://www.php-trivandrum.org/code-snippets/paged-navigation-my-own-way/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 03:43:45 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[php pagination code]]></category>
		<category><![CDATA[php snippets]]></category>
		<category><![CDATA[php tips]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/?p=914</guid>
		<description><![CDATA[Recently while working for a wordpress plugin, though there are a lot of solutions for this, I could not find the exact thing which I needed, and thought about writing one of my own. Just writing it and using in the current project would be a waste, so thought I would slap it on here. [...]]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/code-snippets/paged-navigation-my-own-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Threading PHP scripts using OS facilities</title>
		<link>http://www.php-trivandrum.org/code-snippets/threading-php-scripts-using-os-facilities/</link>
		<comments>http://www.php-trivandrum.org/code-snippets/threading-php-scripts-using-os-facilities/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 17:13:35 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[php tips]]></category>
		<category><![CDATA[threading php]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/code-snippets/threading-php-scripts-using-os-facilities/</guid>
		<description><![CDATA[Recently while developing systems which consumes webservices, after a lot of optimizations were put into our code, we resorted to do some sort of benchmarking. From the begenning itself, we had proper loggers which were logging the activities to database tables, and verbose text files. For benchmarking of the systems we use xdebug, and our [...]]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/code-snippets/threading-php-scripts-using-os-facilities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>function getIpBehindProxy</title>
		<link>http://www.php-trivandrum.org/code-snippets/function-getipbehindproxy/</link>
		<comments>http://www.php-trivandrum.org/code-snippets/function-getipbehindproxy/#comments</comments>
		<pubDate>Tue, 19 May 2009 01:25:03 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[php snippets]]></category>
		<category><![CDATA[php tips]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/?p=321</guid>
		<description><![CDATA[We were worried, about all the comments on kerala online, being marked as spam by the akismet plugin. When on detailed examination, we found that the basic problem was that wordpress was logging only the immediate downsteam ip as the remote address, well ours was a bit confusing setup, but to handle the traffic we [...]]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/code-snippets/function-getipbehindproxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Opcode Caches, switching between</title>
		<link>http://www.php-trivandrum.org/code-snippets/php-opcode-caches-switching-between/</link>
		<comments>http://www.php-trivandrum.org/code-snippets/php-opcode-caches-switching-between/#comments</comments>
		<pubDate>Wed, 06 May 2009 02:21:37 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[php tips]]></category>
		<category><![CDATA[speedup php pages]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/?p=245</guid>
		<description><![CDATA[Opcode Cache
A PHP accelerator is an extension designed to boost the performance of software applications written using the PHP programming language. Most PHP accelerators work by caching the compiled bytecode of PHP scripts to avoid the overhead of parsing and compiling source code on each request (some or all of which may never even be [...]]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/code-snippets/php-opcode-caches-switching-between/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AJAXification by js graceful degradation</title>
		<link>http://www.php-trivandrum.org/javascript/ajaxification-by-js-graceful-degradation/</link>
		<comments>http://www.php-trivandrum.org/javascript/ajaxification-by-js-graceful-degradation/#comments</comments>
		<pubDate>Fri, 09 Mar 2007 12:06:58 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[php tips]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/javascript/ajaxification-by-js-graceful-degradation.html</guid>
		<description><![CDATA[Now the question was about a suggestion to have a balance between best designs considering a friendly URL, Ajax, and SEO. It was implied about some contradictory indications. With the discussion passing on to friendly URLs are great if for no reason than log analysis, however, friendly URLs are supposedly better for SEO also (besides [...]]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/javascript/ajaxification-by-js-graceful-degradation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip</title>
		<link>http://www.php-trivandrum.org/code-snippets/quick-tip/</link>
		<comments>http://www.php-trivandrum.org/code-snippets/quick-tip/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 06:48:22 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[php tips]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/code-snippets/quick-tip.html</guid>
		<description><![CDATA[ 
$words = explode("\\n",join('',@file("words.txt")));
  
What does the above code do ?
gets you the words from words.txt,   if you have one, and strips off the newline character, before assigning each word to array element. otherwise you may need array_walk or foreach to do this..
]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/code-snippets/quick-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User input in php command line</title>
		<link>http://www.php-trivandrum.org/code-snippets/user-input-in-php-command-line/</link>
		<comments>http://www.php-trivandrum.org/code-snippets/user-input-in-php-command-line/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 19:22:35 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php command line]]></category>
		<category><![CDATA[php tips]]></category>
		<category><![CDATA[php5-cli]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/2007/01/17/user-input-in-php-command-line/</guid>
		<description><![CDATA[Ever wondered how to capture the user input when writing php command line scripts ?
&#60;?php&#160;function&#160;getInput($msg){&#160;&#160;fwrite(STDOUT,&#160;"$msg:&#160;");&#160;&#160;$varin&#160;=&#160;trim(fgets(STDIN));&#160;&#160;return&#160;$varin;}&#160;?&#62;
The function above is being used by me in certain command line scripts, where I need user responses.
]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/code-snippets/user-input-in-php-command-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>/* a timer class */</title>
		<link>http://www.php-trivandrum.org/uncategorized/a-timer-class/</link>
		<comments>http://www.php-trivandrum.org/uncategorized/a-timer-class/#comments</comments>
		<pubDate>Fri, 15 Sep 2006 20:39:49 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php snippets]]></category>
		<category><![CDATA[php tips]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/2006/09/16/a-timer-class/</guid>
		<description><![CDATA[The code: Source File in text
I usually use this to check the generation time for any page. There are critical applications which we are developing and will need less than a milli second generation time.
]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/uncategorized/a-timer-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; Quotes or No quotes in associative Array?</title>
		<link>http://www.php-trivandrum.org/tips/quotes-or-no-quotes-in-associative-array/</link>
		<comments>http://www.php-trivandrum.org/tips/quotes-or-no-quotes-in-associative-array/#comments</comments>
		<pubDate>Thu, 14 Sep 2006 18:28:48 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[php tips]]></category>
		<category><![CDATA[speedup php pages]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/2006/09/14/quotes-or-no-quotes-in-associative-array/</guid>
		<description><![CDATA[Our team was having a debate on why we should put a &#8216; (single quote) when referencing arrays in php. Well what is the problem if we use $_SESSION[key], instead of $_SESSION['key'].
Well when you think that when encountering non functions or keywords, php tries to evaluate it as a declared constant. So referencing  $_SESSION['key'] [...]]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/tips/quotes-or-no-quotes-in-associative-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Single Quotes vs Double Quotes!</title>
		<link>http://www.php-trivandrum.org/tips/single-quotes-vs-double-quotes/</link>
		<comments>http://www.php-trivandrum.org/tips/single-quotes-vs-double-quotes/#comments</comments>
		<pubDate>Thu, 14 Sep 2006 18:22:48 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[php tips]]></category>
		<category><![CDATA[speedup php pages]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/2006/09/14/single-quotes-vs-double-quotes/</guid>
		<description><![CDATA[I recommend using &#8216; (single quotes) when programming with PHP; Always use &#8216; (single quotes) unless you need the features of &#8221; (double quotes). You might think it&#8217;s much easier to write code as:
echo "Today is the $day of $month";
However, using single quotes forces variables to be outside the quotes; instead when you use the [...]]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/tips/single-quotes-vs-double-quotes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>error_reporting(E_ALL); make code faster</title>
		<link>http://www.php-trivandrum.org/tips/error_reportinge_all-make-code-faster/</link>
		<comments>http://www.php-trivandrum.org/tips/error_reportinge_all-make-code-faster/#comments</comments>
		<pubDate>Thu, 14 Sep 2006 18:17:11 +0000</pubDate>
		<dc:creator>jijutm</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[error reporting]]></category>
		<category><![CDATA[fast code]]></category>
		<category><![CDATA[php tips]]></category>

		<guid isPermaLink="false">http://www.php-trivandrum.org/2006/09/14/error_reportinge_all-make-code-faster/</guid>
		<description><![CDATA[The single most important thing I tell people who use PHP is to turn error reporting to its maximum level. Why would I want to do this? Generally the error reporting is set at a level that will hide many little things like:

declaring a variable ahead of time,
referencing a variable that is not available in [...]]]></description>
		<wfw:commentRss>http://www.php-trivandrum.org/tips/error_reportinge_all-make-code-faster/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

