<?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>Amit Yadav &#187; PHP</title>
	<atom:link href="http://www.amityadav.name/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.amityadav.name</link>
	<description>Things to know for effective coding</description>
	<lastBuildDate>Fri, 10 Sep 2010 04:32:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PHP ORM: Doctrine 2</title>
		<link>http://www.amityadav.name/php-orm-doctrine-2/</link>
		<comments>http://www.amityadav.name/php-orm-doctrine-2/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 03:51:20 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Object-Oriented]]></category>
		<category><![CDATA[Object-oriented programming]]></category>
		<category><![CDATA[Object-relational mapping]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Programming language]]></category>
		<category><![CDATA[Same Old Php Orm View]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=672</guid>
		<description><![CDATA[At the start of my career as a developer, there were almost no ORM for PHP, there existed some classes that enabled you to easily access DB but not ORM. ORM(Object Relational Mapping) in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. In other words it maps the relational database [...]]]></description>
			<content:encoded><![CDATA[<p><img style="visibility: hidden; width: 0px; height: 0px;" src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bT*xJmx*PTEyODQwOTAxMTk*NjkmcHQ9MTI4NDA5MDEyNTAxNSZwPTEwMTkxJmQ9c3NfZW1iZWQmZz*yJm89YTIyNzQ4NWM4M2I*/NGE*ODk4MjIyM2JiM2E3NDMyNGImb2Y9MA==.gif" border="0" alt="" width="0" height="0" /></p>
<p>At the start of my career as a developer, there were almost no <a class="zem_slink" title="Object-relational mapping" rel="wikipedia" href="http://en.wikipedia.org/wiki/Object-relational_mapping">ORM</a> for <a class="zem_slink" title="PHP" rel="homepage" href="http://www.php.net/">PHP</a>, there existed some classes that enabled you to easily access DB but not ORM.</p>
<p>ORM(Object Relational Mapping) in computer <a class="zem_slink" title="Computer software" rel="wikipedia" href="http://en.wikipedia.org/wiki/Computer_software">software</a> is a <a title="Computer programming" href="http://en.wikipedia.org/wiki/Computer_programming">programming</a> technique for converting data between incompatible <a title="Type system" href="http://en.wikipedia.org/wiki/Type_system">type systems</a> in <a title="Object-oriented" href="http://en.wikipedia.org/wiki/Object-oriented">object-oriented</a> programming languages. In other words it maps the relational database to the objects in your application. So each table becomes and object.</p>
<p>Doctrine is one of the powerful ORM present for PHP and with Doctrine 2 its has provided more features and ease of accessing database.</p>
<div style="width: 425px;"><strong><a title="Doctrine 2 - Not The Same Old Php Orm" href="http://www.slideshare.net/jwage/doctrine-2-not-the-same-old-php-orm">Doctrine 2 &#8211; Not The Same Old Php Orm</a></strong><object id="__sse3197175" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=doctrine2-notthesameoldphporm-100216104508-phpapp01&amp;stripped_title=doctrine-2-not-the-same-old-php-orm" /><param name="name" value="__sse3197175" /><param name="allowfullscreen" value="true" /><embed id="__sse3197175" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=doctrine2-notthesameoldphporm-100216104508-phpapp01&amp;stripped_title=doctrine-2-not-the-same-old-php-orm" name="__sse3197175" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<div id="__ss_3197175" style="width: 425px;">
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/jwage">Jonathan Wage</a>.</div>
</div>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=b0c94c79-5057-49ba-9485-b62d893e955e" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/php-orm-doctrine-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP Migrations Plugin</title>
		<link>http://www.amityadav.name/cakephp-migrations-plugin/</link>
		<comments>http://www.amityadav.name/cakephp-migrations-plugin/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 04:22:03 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Application Design]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[migrations]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=627</guid>
		<description><![CDATA[I regularly read through http://cakedc.com/, they have lots of CakePHP plugin that i can use in my CakePHP development. I was facing some problems with cakePHP migrations, i am not saying that CakePHP does not support that but its not come by default with the framework, you have to put some efforts to get it done. [...]]]></description>
			<content:encoded><![CDATA[<p>I regularly read through http://cakedc.com/, they have lots of CakePHP plugin that i can use in my CakePHP development. I was facing some problems with cakePHP migrations, i am not saying that CakePHP does not support that but its not come by default with the framework, you have to put some efforts to get it done.<br />
I came across <a title="CakePHP Migration Plugin" href="http://cakedc.com/eng/downloads/view/cakephp_migrations_plugin" target="_blank">this </a>CakePHP migration plugin that seems to be very useful in keeping my DB migration manageable.</p>
<p>The Migrations plugin provides a comprehensive management system  whereby the database schema for a CakePHP project can fluctuate during  development involving any number of developers. This is achieved by  incrementally managing database changes, providing customisable hooks  and callbacks for data migration and changes to meet migration paths,  and migration maps to provide flexible application of migration  instances.</p>
<p>Migrations is great for any development team, or individual that  wants to manage database schema and data changes throughout the  development lifetime of a project.</p>
<h3>Requirements</h3>
<p>CakePHP 1.3 or higher.</p>
<p>If you need a version to use with CakePHP 1.2 please contact us directly.</p>
<p>You can download the plugin from CakeDC site http://cakedc.com/eng/downloads/view/cakephp_migrations_plugin</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/cakephp-migrations-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP Paginate Count with group by</title>
		<link>http://www.amityadav.name/cakephp-paginate-count-with-group-by/</link>
		<comments>http://www.amityadav.name/cakephp-paginate-count-with-group-by/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 09:08:04 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=584</guid>
		<description><![CDATA[I am working on a CakePHP project these days, today i ran into a different problem with CakePHP. Sometimes i feel that there are small-small things that are sometimes missed by the Cake developers, but thank God that there are some workarounds available to them.  Here is the problem statement that i encountered, i had [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on a CakePHP project these days, today i ran into a different problem with CakePHP. Sometimes i feel that there are small-small things that are sometimes missed by the Cake developers, but thank God that there are some workarounds available to them.  Here is the problem statement that i encountered, i had a table in which i was having duplicate records and i wanted to show only distinct records in the data grid which was using the CakePHP paginator class to create a paginated data grid.</p>
<p>Now to show only the distinct rows i used the group by clause to eliminate the duplicate records, the records were coming fine but when i saw the paging it was not working right at all. The problem was that the paginator&#8217;s &#8220;paginateCount&#8221; function was also considering the &#8220;Group By&#8221; clause while doing the counting of the total records. This was crazy.</p>
<p>I searched through Google to get a solution to that and found <a href="https://trac.cakephp.org/ticket/5123" target="_blank">this </a>link, where people have already reported a his error to the cake developers. The solution that worked for me was that i needed to override the &#8220;paginateCount&#8221; function and use a different function in my model to get the correct number of total records. I added this function to my model and whola it worked for me. Here is the function that needs to be added model to get things right.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p584code2'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5842"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code" id="p584code2"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> paginateCount<span style="color: #009900;">&#40;</span><span style="color: #000088;">$conditions</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #000088;">$recursive</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$extra</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$parameters</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/compact"><span style="color: #990000;">compact</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'conditions'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'recursive'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$extra</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'group'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$parameters</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fields'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$extra</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'group'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/is_string"><span style="color: #990000;">is_string</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$parameters</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fields'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #666666; font-style: italic;">// pagination with single GROUP BY field</span>
				<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$parameters</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fields'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'DISTINCT '</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #000088;">$parameters</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fields'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'DISTINCT '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$parameters</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fields'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
				<a href="http://www.php.net/unset"><span style="color: #990000;">unset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$extra</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'group'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>find<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'count'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array_merge"><span style="color: #990000;">array_merge</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$parameters</span><span style="color: #339933;">,</span> <span style="color: #000088;">$extra</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #666666; font-style: italic;">// resort to inefficient method for multiple GROUP BY fields</span>
				<span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>find<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'count'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array_merge"><span style="color: #990000;">array_merge</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$parameters</span><span style="color: #339933;">,</span> <span style="color: #000088;">$extra</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getAffectedRows<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">// regular pagination</span>
			<span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>find<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'count'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array_merge"><span style="color: #990000;">array_merge</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$parameters</span><span style="color: #339933;">,</span> <span style="color: #000088;">$extra</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$count</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=cc53dd5d-c0c6-46ff-8d1d-eb7ae69e4fea" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/cakephp-paginate-count-with-group-by/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CakePHP Sharing sessions between apps on the same domain</title>
		<link>http://www.amityadav.name/cakephp-sharing-sessions-between-apps-on-the-same-domain/</link>
		<comments>http://www.amityadav.name/cakephp-sharing-sessions-between-apps-on-the-same-domain/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 10:07:43 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=415</guid>
		<description><![CDATA[Few days back i was working on two separate CakePHP applications, suddenly there was a need to maintain session between these two separate apps working on the same domain. Let me explain a bit more. Cake-logo Image via Wikipedia I was having two apps (i)wishlist (ii) lighthouse These are two separate apps under the root [...]]]></description>
			<content:encoded><![CDATA[<p>Few days back i was working on two separate <a class="zem_slink" title="CakePHP" rel="wikipedia" href="http://en.wikipedia.org/wiki/CakePHP">CakePHP</a> <a class="zem_slink" title="Application software" rel="wikipedia" href="http://en.wikipedia.org/wiki/Application_software">applications</a>, suddenly there was a need to maintain session between these two separate apps working on the same domain. Let me explain a bit more.</p>
<div class="zemanta-img zemanta-action-dragged" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright" style="width: 190px;">
<dt class="wp-caption-dt"><div class="img " style="width:76px;">
	<a href="http://en.wikipedia.org/wiki/File:Cake-logo.png"><img src="http://upload.wikimedia.org/wikipedia/en/9/9a/Cake-logo.png" alt="Cake-logo" width="76" height="76" /></a>
	<div>Cake-logo</div>
</div></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image via <a href="http://en.wikipedia.org/wiki/File:Cake-logo.png">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>I was having two apps (i)wishlist (ii) lighthouse</p>
<p>These are two separate apps under the root folder having the directory structure as:<br />
/htdocs<br />
/wishlist<br />
/app<br />
/config<br />
&#8230;.<br />
/lighthouse<br />
/app<br />
/config &#8230;.</p>
<p>By default the sessions are created relative to the apps directory, and this was the problem i was dealing with, not a big thing but i spent a lot of time figuring this, but for you its will work like a charm.</p>
<p>Steps that i follow to make the two apps share sessions between them.<br />
<strong>1.</strong> Edit &#8220;core.php&#8221; for wishlist and the lighthouse and add the line<br />
<span style="color: #ff0000;">ini_set(&#8216;session.cookie_path&#8217;, &#8220;/&#8221;);</span><br />
This is to direct the CakePHP app to create the session on the root</p>
<p><strong>2. </strong>The <strong>Session.cookie</strong> name should be same for the two apps</p>
<p><strong>3.</strong> The <strong>Session.salt</strong> should be same for the two apps</p>
<p><strong>4.</strong> Security.level should be low in both the apps</p>
<p>This is it what is required. Let me know if you are still stuck with the things, happy coding.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=8d80a122-92fc-4bf8-bbf4-c6a5617afc42" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/cakephp-sharing-sessions-between-apps-on-the-same-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Fuzzy Address Matching Algo (Levenshtein)</title>
		<link>http://www.amityadav.name/php-fuzzy-address-matching-algo-levenshtein/</link>
		<comments>http://www.amityadav.name/php-fuzzy-address-matching-algo-levenshtein/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 10:13:30 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[levenshtein]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=409</guid>
		<description><![CDATA[Few days back i encountered a weird problem. I had three tables in my DB viz: students, sites, company. Student table has the address fields and a column named &#8220;site_id&#8221; to connect it to the sites table. Sites table also has its address fields. Now the challenge was to update the &#8220;site_id&#8221; field of the [...]]]></description>
			<content:encoded><![CDATA[<p>Few days back i encountered a weird problem.<br />
I had three tables in my DB viz: students, sites, company. Student table has the address fields and a column named &#8220;site_id&#8221; to connect it to the sites table. Sites table also has its address fields.</p>
<p>Now the challenge was to update the &#8220;site_id&#8221; field of the students table based on the matching address in the student and the site table. The address fields in both the tables were divided into following fields</p>
<ul>
<li> address1</li>
<li> address2</li>
<li> city</li>
<li> state</li>
<li> country</li>
<li> zip</li>
</ul>
<p>Now i had to think of a solution of how to do it. After googling a while i found a function called &#8220;levenshtein()&#8221; in PHP. This function calculated the distance between two given strings, bingo i got an idea and implemented the sddress matching algorithm. I have attached the file with this post.<br />
Kindly let me if that was helpful to you.</p>
<p>Download the code from here -&gt; <a href="../wp-content/uploads/2010/04/fuzzy-match.pdf">fuzzy-match</a></p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=11459b1d-9cf9-4078-9aec-0c84c184c5ba" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/php-fuzzy-address-matching-algo-levenshtein/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook: HipHop for PHP</title>
		<link>http://www.amityadav.name/facebook-hiphop-for-php/</link>
		<comments>http://www.amityadav.name/facebook-hiphop-for-php/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 06:25:12 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Hip hop]]></category>
		<category><![CDATA[Just-in-time compilation]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=396</guid>
		<description><![CDATA[﻿Facebook officially announced the project, titled HipHop, this morning and confirmed that it would be released as open source this evening. Facebook has been working on a PHP compiler that will increase speed by around 80% and offer a just-in-time (JIT) compilation engine that will offer a number of advantages. Less CPU means fewer servers, which [...]]]></description>
			<content:encoded><![CDATA[<p>﻿Facebook officially announced the project, titled HipHop, this morning and confirmed that it would be  released as <a class="zem_slink" title="Open source" rel="wikipedia" href="http://en.wikipedia.org/wiki/Open_source">open source</a> this evening.</p>
<p><a class="zem_slink" title="Facebook" rel="homepage" href="http://facebook.com">Facebook</a> has been working on a <a class="zem_slink" title="PHP" rel="homepage" href="http://www.php.net/">PHP</a> <a class="zem_slink" title="Compiler" rel="wikipedia" href="http://en.wikipedia.org/wiki/Compiler">compiler</a> that will increase  speed by around 80% and offer a just-in-time (<a class="zem_slink" title="Just-in-time compilation" rel="wikipedia" href="http://en.wikipedia.org/wiki/Just-in-time_compilation">JIT</a>) compilation engine  that will offer a number of advantages.</p>
<p>Less <a class="zem_slink" title="Central processing unit" rel="wikipedia" href="http://en.wikipedia.org/wiki/Central_processing_unit">CPU</a> means fewer servers, which means less overhead. This project  has had a tremendous impact on Facebook</p>
<p>HipHop for PHP isn&#8217;t technically a compiler itself, it is a source <a class="zem_slink" title="Source code" rel="wikipedia" href="http://en.wikipedia.org/wiki/Source_code">code</a> transformer.  HipHop programmatically transforms your  PHP source code into highly optimized C++ and then uses g++ to compile  it.</p>
<p>HipHop executes the source code in a semantically equivalent manner and  sacrifices some rarely used features — such as <a class="zem_slink" title="Eval" rel="wikipedia" href="http://en.wikipedia.org/wiki/Eval">eval()</a> — in exchange for  improved performance.</p>
<p>HipHop includes a code transformer, a reimplementation of PHP&#8217;s <a class="zem_slink" title="Run-time system" rel="wikipedia" href="http://en.wikipedia.org/wiki/Run-time_system">runtime  system</a>, and a rewrite of many common PHP Extensions to take advantage of  these performance optimizations.</p>
<p>You can read more about HipHop <a title="HipHop" href="http://developers.facebook.com/news.php?blog=1&amp;story=358">here</a></p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=e26871b7-b7f7-4fd9-8ef4-ef80f4aaa634" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/facebook-hiphop-for-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Technology Tasting &#8211; HipHop for PHP</title>
		<link>http://www.amityadav.name/facebook-technology-tasting-hiphop-for-php/</link>
		<comments>http://www.amityadav.name/facebook-technology-tasting-hiphop-for-php/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 05:35:53 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=394</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="386" id="utv126242" name="utv_n_674290"><param name="flashvars" value="loc=%2F&amp;autoplay=false&amp;vid=4409735" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.ustream.tv/flash/video/4409735" /><embed flashvars="loc=%2F&amp;autoplay=false&amp;vid=4409735" width="480" height="386" allowfullscreen="true" allowscriptaccess="always" id="utv126242" name="utv_n_674290" src="http://www.ustream.tv/flash/video/4409735" type="application/x-shockwave-flash" /></object></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/facebook-technology-tasting-hiphop-for-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CakePHP &#8211; Pagination Sorting on 2 Columns</title>
		<link>http://www.amityadav.name/cakephp-pagination-sorting-on-2-columns/</link>
		<comments>http://www.amityadav.name/cakephp-pagination-sorting-on-2-columns/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 12:18:39 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=344</guid>
		<description><![CDATA[I was just wondering how one can sort on two columns at the same time through CakePHP framework. It was a need for one om project and i was using whole lot of other components and helpers along with pagination, so i found a way out for doing this. Here is my solution to the [...]]]></description>
			<content:encoded><![CDATA[<p><span class="Apple-style-span" style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; font-family: 'Times New Roman'; color: #000000;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px; font-family: Verdana,Arial,Helvetica,sans-serif;">I was just wondering how one can sort on two columns at the same time through CakePHP framework. It was a need for one om project and i was using whole lot of other components and helpers along with pagination, so i found a way out for doing this.</p>
<p>Here is my solution to the problem.<br />
The way to do it is inject the second sort column into the passed argument array before calling the $this-&gt;paginate function. So here is what i did.</span></span></p>
<div class="quoteHeader" style="margin: 10px 20px 0px;"><strong><br />
</strong></div>
<div id="code_0_26d81722_ln" class="quoteCode" style="border: 1px solid silver; margin: 0px 20px 5px; padding: 0px; overflow: auto; font-family: monospace; background-color: #ebebeb; min-height: 36px;">
<div style="padding: 10px; font-size: 12px;">$this-&gt;mergeSortParameters(array(&#8220;xyz.firstname&#8221;=&gt; ($this-&gt;passedArgs['direction'])? $this-&gt;passedArgs['direction'] : &#8216;asc&#8217;));</div>
</div>
<p>Here is the function that needs to be called before calling the paginate method</p>
<div class="quoteHeader" style="margin: 10px 20px 0px;"><strong><br />
</strong></div>
<div id="code_1_657554f2_ln" class="quoteCode" style="border: 1px solid silver; margin: 0px 20px 5px; padding: 0px; overflow: auto; font-family: monospace; background-color: #ebebeb; min-height: 36px;">
<ol style="border: 0px solid silver; margin: 0px; padding: 0px 0px 0px 45px; background-color: #e7e7e7; list-style-type: decimal-leading-zero; background-image: url(http://www.ozzu.com/styles/light/theme/images/code_line_numbers.gif); font-size: 12px; line-height: 18px;">
<li class="li1" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e7e7e7;">//Function to merge all the sorting parameters</li>
<li class="li2" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e3e3e3;">function mergeSortParameters($sort_extras){</li>
<li class="li1" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e7e7e7;"> $sortParams = array();</li>
<li class="li2" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e3e3e3;"> if( isset($this-&gt;passedArgs["sort"]) ) {</li>
<li class="li1" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e7e7e7;"> // Use merge of sort request and extras</li>
<li class="li2" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e3e3e3;"> $sortParams = am( $sort_extras, array($this-&gt;passedArgs["sort"] =&gt; $this-&gt;passedArgs["direction"]));</li>
<li class="li1" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e7e7e7;"> } elseif( isset( $this-&gt;paginate['order'] ) ) {</li>
<li class="li2" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e3e3e3;"> // Use default sort</li>
<li class="li1" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e7e7e7;"> $sortParams = $this-&gt;paginate['order'];</li>
<li class="li2" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e3e3e3;"> }</li>
<li class="li2" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e3e3e3;"> $this-&gt;passedArgs = array( &#8216;order&#8217; =&gt; $sortParams, &#8216;keywords&#8217; =&gt; $this-&gt;passedArgs['keywords']);</li>
<li class="li1" style="margin: 0px; padding: 0px 10px; font-weight: normal; vertical-align: top; background-color: #e7e7e7;"> }</li>
</ol>
</div>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=01fc2029-9ac7-477b-9f46-babffa3a766c" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/cakephp-pagination-sorting-on-2-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Custom DateFiff Function</title>
		<link>http://www.amityadav.name/php-custom-datefiff-function/</link>
		<comments>http://www.amityadav.name/php-custom-datefiff-function/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 11:04:58 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Integers]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Recreation]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=345</guid>
		<description><![CDATA[?View Code PHP1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p345code5'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3455"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
</pre></td><td class="code" id="p345code5"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> datediff<span style="color: #009900;">&#40;</span><span style="color: #000088;">$interval</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dateto</span><span style="color: #339933;">,</span> <span style="color: #000088;">$using_timestamps</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">/*
    $interval can be:
    yyyy - Number of full years
    q - Number of full quarters
    m - Number of full months
    y - Difference between day numbers
      (eg 1st Jan 2004 is &quot;1&quot;, the first day. 2nd Feb 2003 is &quot;33&quot;. The datediff is &quot;-32&quot;.)
    d - Number of full days
    w - Number of full weekdays
    ww - Number of full weeks
    h - Number of full hours
    n - Number of full minutes
    s - Number of full seconds (default)
  */</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$using_timestamps</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$datefrom</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strtotime"><span style="color: #990000;">strtotime</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$datefrom</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$dateto</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/strtotime"><span style="color: #990000;">strtotime</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dateto</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000088;">$difference</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dateto</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$datefrom</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Difference in seconds</span>
&nbsp;
  <span style="color: #b1b100;">switch</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$interval</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'yyyy'</span><span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Number of full years</span>
      <span style="color: #000088;">$years_difference</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$difference</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">31536000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/mktime"><span style="color: #990000;">mktime</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;H&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;i&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;s&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;n&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;j&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #000088;">$years_difference</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$years_difference</span><span style="color: #339933;">--;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/mktime"><span style="color: #990000;">mktime</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;H&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;i&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;s&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;n&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;j&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$years_difference</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$years_difference</span><span style="color: #339933;">++;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$years_difference</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;q&quot;</span><span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Number of full quarters</span>
      <span style="color: #000088;">$quarters_difference</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$difference</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">8035200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/mktime"><span style="color: #990000;">mktime</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;H&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;i&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;s&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;n&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$quarters_difference</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;j&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$months_difference</span><span style="color: #339933;">++;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #000088;">$quarters_difference</span><span style="color: #339933;">--;</span>
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$quarters_difference</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;m&quot;</span><span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Number of full months</span>
      <span style="color: #000088;">$months_difference</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$difference</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2678400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/mktime"><span style="color: #990000;">mktime</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;H&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;i&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;s&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;n&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$months_difference</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;j&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$months_difference</span><span style="color: #339933;">++;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #000088;">$months_difference</span><span style="color: #339933;">--;</span>
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$months_difference</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'y'</span><span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Difference between day numbers</span>
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;z&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dateto</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;z&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;d&quot;</span><span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Number of full days</span>
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$difference</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">86400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;w&quot;</span><span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Number of full weekdays</span>
      <span style="color: #000088;">$days_difference</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$difference</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">86400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$weeks_difference</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$days_difference</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Complete weeks</span>
      <span style="color: #000088;">$first_day</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;w&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$datefrom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$days_remainder</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$days_difference</span> <span style="color: #339933;">%</span> <span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$odd_days</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$first_day</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$days_remainder</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Do we have a Saturday or Sunday in the remainder?</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$odd_days</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// Sunday</span>
        <span style="color: #000088;">$days_remainder</span><span style="color: #339933;">--;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$odd_days</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">6</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// Saturday</span>
        <span style="color: #000088;">$days_remainder</span><span style="color: #339933;">--;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$weeks_difference</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$days_remainder</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;ww&quot;</span><span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Number of full weeks</span>
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$difference</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">604800</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;h&quot;</span><span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Number of full hours</span>
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$difference</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">3600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;n&quot;</span><span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Number of full minutes</span>
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$difference</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">default</span><span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// Number of full seconds (default)</span>
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$difference</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>   
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$datediff</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Usage:</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p345code6'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3456"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p345code6"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> datediff<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'w'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'9 July 2003'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'4 March 2004'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<div class="zemanta-pixie" style="margin-top:10px;height:15px"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=160968f3-666b-495f-a90f-74a2515550a9" style="border:none;float:right"><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/php-custom-datefiff-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework 1.8 Released!</title>
		<link>http://www.amityadav.name/zend-framework-18-released/</link>
		<comments>http://www.amityadav.name/zend-framework-18-released/#comments</comments>
		<pubDate>Wed, 13 May 2009 18:41:52 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Amazon Elastic Compute Cloud]]></category>
		<category><![CDATA[Amazon S3]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rapid application development]]></category>
		<category><![CDATA[ZF1.8]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=298</guid>
		<description><![CDATA[I just received Zend&#8217;s newsletter regarding the release of Zend Framework 1.8. New features are - rapid application development (RAD) using the new code generation classes, allowing developers to bootstrap their applications quickly – also available are new cloud classes – abstracting and simplifying access to Amazon&#8216;s S3 and EC2 services, exposing users to scalable [...]]]></description>
			<content:encoded><![CDATA[<p>I just received Zend&#8217;s newsletter regarding the release of Zend Framework 1.8.</p>
<p>New features are<br />
- rapid application development (RAD) using the new code generation classes, allowing developers to <a class="zem_slink" title="Bootstrapping" rel="wikipedia" href="http://en.wikipedia.org/wiki/Bootstrapping">bootstrap</a> their applications quickly<br />
– also available are new cloud classes – abstracting and simplifying access to <a class="zem_slink" title="Amazon" rel="homepage" href="http://amazon.com/">Amazon</a>&#8216;s <a class="zem_slink" title="Amazon S3" rel="homepage" href="http://aws.amazon.com/s3">S3</a> and EC2 services, exposing users to scalable deployment infrastructure.</p>
<p> </p>
<p><a title="Zend Framework 1.8" href="http://framework.zend.com/download/latest" target="_blank">Download Zend Framework 1.8</a></p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=beb7d49f-c45d-4eca-8104-5a3b5de74196" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/zend-framework-18-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>50 Blogging Tools to Help you</title>
		<link>http://www.amityadav.name/50-blogging-tools-to-help-you/</link>
		<comments>http://www.amityadav.name/50-blogging-tools-to-help-you/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 11:14:56 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[World Wide Web]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=200</guid>
		<description><![CDATA[  blogging-tools Blogging is more than just posting your views and any serious blogger would agree to that note hands down. There are many specialized tools available on the Internet that can enhance your website to a whopping extent and the only way to know what is going to work to your profits’ is to [...]]]></description>
			<content:encoded><![CDATA[<p> </p>
<div class="img alignnone size-full wp-image-749" style="width:422px;">
	<img src="http://www.blogohblog.com/wp-content/pop/2008/10/blogging-tools.gif" alt="" width="422" height="100" />
	<div>blogging-tools</div>
</div>
<p></p>
<p>Blogging is more than just posting your views and any serious blogger would  agree to that note hands down. There are many specialized tools available on the  Internet that can enhance your website to a whopping extent and the only way to  know what is going to work to your profits’ is to just try them out! Here is a  list of 50 useful blogging tools (other than brains, creativity and the will to  work!) that will help you in picking up your bet.</p>
<h3>Let’s kick off with ‘Hosting, DNS and domainname’- that’s the first step  anyways!</h3>
<p>1. <a href="http://www.domainscour.com/">Domainscour</a>: This is a website  which helps you to find all the available domains in your niche within a span of  few seconds. Powered by web 2.0.</p>
<p>2. <a href="http://www.myipneighbors.com/">MyIPneighbours</a>: Snooping is  always fun, right? This IP search facilitates in finding out how many other  websites your ’shared host’ is <a class="zem_slink" title="Web hosting service" rel="wikipedia" href="http://en.wikipedia.org/wiki/Web_hosting_service">hosting</a>! This information if handled  appropriately can be useful in web analytics and <a class="zem_slink" title="Search engine optimization" rel="wikipedia" href="http://en.wikipedia.org/wiki/Search_engine_optimization">SEO</a>.</p>
<p>3. <a href="file:///C:/Documents%20and%20Settings/amit.y/Application%20Data/Feedreader/cache/www.whoishostingthis.com">WhoIshostingthis</a>: A simple tool  that enables you to find out the hosting company behind any website! Looking for  a change in website hosting?</p>
<p>4. <a href="file:///C:/Documents%20and%20Settings/amit.y/Application%20Data/Feedreader/cache/www.yougetsignal.com">You Get Signal</a>: This is a collection of  various network tools and has in store, some of the best tools in the internet  community. A treasure of useful resources!</p>
<h3>Now for the attires, make-up and presentation &#8211; Design and Color.</h3>
<p>5. <a href="http://www.genfavicon.com/">GenFavIcon</a>: An online tool that  lets you select or create your own Favicons &#8211; Unique little icons that are  displayed alongside a site’s name in the address bars of browsers.</p>
<p>6. <a href="http://www.degraeve.com/color-palette/">Color Palette  generator</a>: You want similar colors (if not the same) like the ones in that  particular image? Well, just type the URL of that image and you are gifted with  a color palette, matching it. Simply wow! Isn’t it?</p>
<p>7. <a href="http://www.wellstyled.com/tools/colorscheme2/index-en.html">Color  Scheme Generator 2</a>: The tool basically generates a wide range of color  schemes using the best optical impression (one of the authentic algorithms used  in doing so!).</p>
<p>8. <a href="http://www.fonttester.com/">Font Tester</a>: The right tool to  find out the right style/font/size/color for your website has arrived! It’s a  free online font comparison tool that does almost everything in the world of  fonts.</p>
<p>9. <a href="http://www.webpositionadvisor.com/tools/screen_size_tester.php">Screen  Size Tester</a>: Unless you want your website to look distorted in different  available browsers, you better check out this tool &#8211; it will definitely make  your job a lot easier!</p>
<h3>Now the geeky part (not exactly!) &#8211; Programming and coding</h3>
<p>10. <a href="http://www.sprymedia.co.uk/article/Grid">Grid</a>: The  fundamental of layouts is grids. ‘Grid’ is a manipulative and intuitive tool  that facilitates the overlaying of a layout for any grid-based website.</p>
<p>11. <a href="http://isnoop.net/tools/css.php">CSS Superdouche</a>: A superb  tool that sensibly reduces the complex and unwanted parts of your CSS code to  trimmed ones. You can call it the ‘designer of code’!</p>
<p>12. <a href="http://centricle.com/ref/css/filters">Centricle</a>: You’ve done  the finest coding possible for your website! Great! But one simple question &#8211; Is  your CSS file compatible with all the browsers? Get your answers with this  tool.</p>
<h3>Web forms and its guild!</h3>
<p>13. <a href="http://wufoo.com/">WuFoo</a>: It’s an innovative <a class="zem_slink" title="Form (web)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Form_%28web%29">HTML form</a> builder that aids you in creating some of the most beautiful forms, invitations  and surveys.</p>
<p>14. <a href="http://www.webformfactory.com/">Web Form Factory</a>: Standing  true to its name, Web form factory is an open source generator of web forms. It  automatically generates the much needed backend code to hold a particular form  to a database.</p>
<p>15. <a href="http://www.phpform.org/">PHP form</a>: Stop drowning your heads  into ‘Dummies for PHP’ and related books! It just takes three simple steps with  this tool, to create a PHP form!</p>
<h3>Content! One of the fundamentals of your website!</h3>
<p>16. <a href="http://www.orangoo.com/spell/">Orangoo spell check</a>: It’s an  online spell checker, a kind of free proof-reader! The results are very accurate  and you don’t even need to download any kind of software or toolbar.</p>
<p>17. <a href="http://www.thecompleteword.com/">TheCompleteWord</a>: Creative  minds do need rest or maybe some new sources? Scourge through millions of  articles here by just typing the necessary keywords!</p>
<p>18. <a href="http://www.worldlingo.com/en/microsoft/computer_translation.html">WorldLingo</a>:  Just the way you don’t understand the language of people at the other end of the  planet, similarly they don’t understand yours! Find the perfect translation of  your language in English through this tool.</p>
<h3><a class="zem_slink" title="Social bookmarking" rel="wikipedia" href="http://en.wikipedia.org/wiki/Social_bookmarking">Social Bookmarking</a>- A necessity.</h3>
<p>19. <a href="http://www.addthis.com/">AddThis</a>: This tool spreads your  website links throughout the internet at virus-like speed (although it’s not  considered spam!) and makes it easier for people to bookmark your ‘darling’ and  share it with others.</p>
<p>20. <a href="http://www.socialmarker.com/">Social Marker</a>: The promotion of  your website is bound to take a huge leap with this tool in your kitty. This  website offers free service through promotion and social bookmarking of your  website. It saves a lot of your time and money for the PR!</p>
<h3>Logos and more</h3>
<p>21. <a href="http://www.logogenerator.com/">Logo generator</a>: It has a  self-explanatory name! Generates lovely Web 2.0 logos for your website.</p>
<p>22. <a href="http://www.buttonator.com/">Buttonator</a>: This tool gives the  liberty of creating, dragging and dropping buttons to your website (web 2.0  compatible).</p>
<p>23. <a href="http://www.mycoolbutton.com/">MyCoolButton</a>: Creates marvelous  web 2.0 buttons! It’s renowned for its user-friendliness and a host of options  to help.</p>
<p>24. <a href="http://www.stripedesigner.com/">StripeDesigner</a>: Create  stripes &#8211; the easy way. These little things do add on to <a class="zem_slink" title="World Wide Web" rel="wikipedia" href="http://en.wikipedia.org/wiki/World_Wide_Web">the Web</a> 2.0 look.</p>
<p>25. <a href="http://www.spiffycorners.com/">Spiffy corners</a>: Create rounded  corners with the HTML and CSS provided by the tool, without the usage of some  heavy images and <a class="zem_slink" title="JavaScript" rel="wikipedia" href="http://en.wikipedia.org/wiki/JavaScript">JavaScript</a> (this one’s heavy on brains, not size!).</p>
<p>26. <a href="http://www.tartanmaker.com/">Tartan Maker</a>: If you aren’t the  ’stripes’ types, then create and use ‘tartans’ for your background. Try this  tool!</p>
<h3>Up-time, SEO and marketing</h3>
<p>27. <a href="http://www.urltrends.com/">URL trends</a>: UrlTrends is a service  that helps you track your marketing, perform competitive intelligence and get  the data you need to make better domain purchases.</p>
<p>28. <a href="http://freekeywords.wordtracker.com/">Word-tracker</a>: “You  enter a keyword and you get back hundreds of related keywords and an approximate  of their daily search volume”- This isn’t fiction, it’s the functioning of this  tool!</p>
<p>29. <a href="http://www.seomoz.org/crawl-test">Crawl test</a>: The search  engine crawling issues of your website will be taken to task from now on. This  tool happens to be a crawling issue diagnose specialist.</p>
<p>30. <a href="http://www.siteuptime.com/">SiteUptime</a>: A monitoring service  for your website that notifies you via SMS or email in cases of your website is  unavailable.</p>
<p>31.<a href="http://host-tracker.com/"> HostTracker</a>: Register to this  service and it’ll set some monitoring points, which will be monitored carefully  in case of errors and other problems in your website.</p>
<p>32. <a href="http://www.onlinemetatag.com/">OnlineMetatag</a>: Good Meta tags  will help you in fetching a good rank in a search engine. This tool generates  different Meta tags for various search engines.</p>
<h3>Rankings! Its time for your grades!</h3>
<p>33. <a href="http://www.text-link-ads.com/blog_juice/">Blog Juice</a>: Blog  Juice Calculator Determine the “blog juice” for your blog using this tool from  Text-Link-Ads and compare with various other blogs from the blogosphere. Juice  is determined from your Bloglines subscription, Alexa rank, Technorati rank and  inbound links in Technorati.</p>
<p>34. <a href="http://www.dnscoop.com/">DNScoop</a>: How much is your domain  name worth? Use dnScoop to check and verify before you buy or sell, then discuss  buy and sell domain names in the dnscoop forums.</p>
<p>35. <a href="http://www.xinureturns.com/">Xinu</a>: Check PageRank, Backlinks,  Indexed Pages, Rankings and more.</p>
<p>36. <a href="http://www.websitegrader.com/">Website grader</a>: A free SEO  tool from HubSpot that provides an Internet Marketing Report for your website.  Tips on how to improve your existing website are also suggested by this  tool.</p>
<p>37. <a href="http://www.seomoz.org/trifecta">Page Strength</a>: Like its  name, the tool weighs a site’s or more commonly the page’s visibility and  relative importance.</p>
<p>38. <a href="http://www.prchecker.info/check_page_rank.php">PR checker</a>:  By adding our Page Rank Checker tool (page rank icon) to your site you can  instantly and easily check the rank (check PR) of all your web site pages right  on your web site.</p>
<p>39. <a href="http://tester.jonasjohn.de/">Test Everything</a>: CSS  validators, HTML validators, web proxies, SEO tools, image tools and more &#8211; just  check everything about your website here!</p>
<p>40. <a href="http://popuri.us/">Popuri.us</a>: It’s an indicator of the  ‘popularity quotient’ of a link. A link’s popularity is checked on the basis of  its ranking, social bookmarking, blogs and other factors.</p>
<h3>Stats and Feedback</h3>
<p>41. <a href="http://www.google.com/analytics/">Google analytics</a>: A gem of  an analytical tool from Google. Forget the mundane information, it even prompts  you on where your visitors come from and their interaction in the website  too.</p>
<p>42. <a href="http://www.webagogo.be/">WebAGogo</a>: A free online tool to test  the quality of a website in tandem to its own set of established/relative  parameters.</p>
<p>43. <a href="http://piwik.org/">Piwik</a>: It’s an ‘open-source’ web analytics  software revealing some juicy and interesting information/reports of your  website.</p>
<p>44. <a href="http://www.phpmyvisites.us/">PHPmyvisites</a>: An open source  software for audience measurements, tracking of visitors and web statistics. One  of the powerful and accurate in vogue!</p>
<h3>Random ones</h3>
<p>45. <a href="http://www.tagcloud-generator.com/">TagCloud generator</a>: It  generates web 2.0 tag clouds corresponding to the keywords on your website.</p>
<p>46. <a href="http://gickr.com/">GickR</a>: The online tool lets you create GIF  animations. It’s free and instant.</p>
<p>47. <a href="http://www.omgili.com/searchamabob/">Searchamabob</a>: This tool  facilitates your website visitors to search using Google or any other search  engine that’s added along to this cool widget.</p>
<p>48. <a href="http://www.xml-sitemaps.com/">XML sitemaps</a>: Placing this tool  will help search engine crawlers to get to your website and track the changes in  your pages more easily.</p>
<p>49. <a href="http://www.shrinktheweb.com/">ShrinkTheWeb</a>: It’s a website  thumbnail provider, in fact the most powerful one.</p>
<p>50. <a href="http://www.websiteribbon.com/">Website ribbon</a>: Create a  unique ribbon for your website and lets you add it to your website instantly. It  builds on the ‘brand’ image of your website and makes it look cooler than ever!</p>
<p> </p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/5a7b55b0-fceb-4ad1-a50a-b82baa78525f/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=5a7b55b0-fceb-4ad1-a50a-b82baa78525f" alt="Reblog this post [with Zemanta]" /></a></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/50-blogging-tools-to-help-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Reader POC Version 1.0</title>
		<link>http://www.amityadav.name/google-reader-poc-version-10/</link>
		<comments>http://www.amityadav.name/google-reader-poc-version-10/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 11:49:34 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Product Releases]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Google Reader]]></category>
		<category><![CDATA[POC]]></category>
		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=111</guid>
		<description><![CDATA[I was just wondering how google has progressed from its search engine to creating new icons for IT world. One of them was the google reader, i found this very interesting how the google reader caters to everybody needs. I am working on doctors &#38; surgeons social networking site, there the client came up with an idea [...]]]></description>
			<content:encoded><![CDATA[<p>I was just wondering how google has progressed from its search engine to creating new icons for IT world. One of them was the google reader, i found this very interesting how the google reader caters to everybody needs. I am working on doctors &amp; surgeons social networking site, there the client came up with an idea to implement google reader in the project to show users about the updates that they have in their baskets. I was chosen to create a POC(Proof of Concepts) for that. I took that as a challenge and created one very basic version of it. Here i would like to share with you the <a title="Google Reader POC by Amit Yadav" href="http://amityadav.name/google_reader/" target="_blank">POC</a> and the <a title="Google Reader POC Code By Amit YAdav" href="http://www.amityadav.name/google_reader/google_reader.rar" target="_blank">code</a>.</p>
<div id="attachment_110" class="wp-caption alignnone" style="width: 577px"><div class="img size-medium wp-image-110 " style="width:567px;">
	<a title="Google Reader POC By Amit Yadav" href="http://www.amityadav.name/google_reader/" target="_blank"><img src="http://www.amityadav.name/wp-content/uploads/2008/12/google-reader.png" alt="Google Reader Copy" width="567"  /></a>
	<div>google-reader</div>
</div><p class="wp-caption-text">Google Reader Copy</p></div>
<p>Please do comment so that i can make it better.</p>
<p>Download the code <a title="Google Reader POC by Amit YAdav" href="http://www.amityadav.name/google_reader/google_reader.rar" target="_blank">here</a>.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/f2ac6743-420e-4329-917f-0585d59a9504/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=f2ac6743-420e-4329-917f-0585d59a9504" alt="Reblog this post [with Zemanta]" /></a></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/google-reader-poc-version-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Basic CMS for converting static sites to dynamic!</title>
		<link>http://www.amityadav.name/basic-cms-for-converting-static-sites-to-dynamic/</link>
		<comments>http://www.amityadav.name/basic-cms-for-converting-static-sites-to-dynamic/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 19:03:40 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[WYSIWYG]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/basic-cms-for-converting-static-sites-to-dynamic/</guid>
		<description><![CDATA[Here is a solution that can convert a static sites to dynamic site on the fly with very little inputs. Here is a content management system that will manage the content of your sites. This is one of the project that i worked on, its still in very basic version but i am still working [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a solution that can convert a static sites to dynamic site on the fly with very little inputs.</p>
<p>Here is a content management system that will manage the content of your sites. This is one of the project that i worked on, its still in very basic version but i am still working on it. This CMS has following features:</p>
<p>- Create pages and one level sub pages for your site.<br />
- Enable/Disable pages that you do not want other to see while they are still under construction.<br />
- Drag and drop one sub page to other parent without any hassle.<br />
-TinyMCE is integrated as the WYSIWYG editor through which you can easily manage your sites pages.</p>
<p>The file attached contains all the needed code and the sql file.</p>
<p>If anyone need my help in getting things work, please let me know.</p>
<p>So guys lets get the best out of the things.</p>
<p><strong><a title="Download CMS" href="http://amityadav.name/PHP_CMS.rar"><span style="color: #ff0000;">Download</span></a></strong></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/basic-cms-for-converting-static-sites-to-dynamic/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oscommerce Admin &#8211; Sales Report Addon</title>
		<link>http://www.amityadav.name/oscommerce-admin-sales-report-addon/</link>
		<comments>http://www.amityadav.name/oscommerce-admin-sales-report-addon/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 17:39:09 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[oscommerce]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/oscommerce-admin-sales-report-addon/</guid>
		<description><![CDATA[Here is a nice addon for admin for generating sales reports. http://addons.oscommerce.com/info/524]]></description>
			<content:encoded><![CDATA[<p>Here is a nice addon for admin for generating sales reports.</p>
<p><a href="http://addons.oscommerce.com/info/524" target="_blank">http://addons.oscommerce.com/info/524</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/oscommerce-admin-sales-report-addon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improved Error Messages in PHP 5</title>
		<link>http://www.amityadav.name/improved-error-messages-in-php-5/</link>
		<comments>http://www.amityadav.name/improved-error-messages-in-php-5/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 04:33:41 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/improved-error-messages-in-php-5/</guid>
		<description><![CDATA[Sometimes its the little things that make a difference. If you run the this test program in PHP 4 (tested on 4.4.7): &#60; ?php function test($arg) { echo "talk like a pirate."; } test(); ?&#62; You get the following message:Warning: Missing argument 1 for test() in /usr/bin/- on line 2 The error message here is [...]]]></description>
			<content:encoded><![CDATA[<div class="content">Sometimes its the little things that make a difference. If you run the this  test program in PHP 4 (tested on 4.4.7):</p>
<pre class="php">&lt; ?php
<span style="font-weight: bold; color: #000000">function</span> test<span style="color: #66cc66">(</span><span style="color: #0000ff">$arg</span><span style="color: #66cc66">)</span> <span style="color: #66cc66">{</span> <a href="http://www.php.net/echo"><span style="color: #000066">echo</span></a> <span style="color: #ff0000">"talk like a pirate."</span>; <span style="color: #66cc66">}</span>
test<span style="color: #66cc66">(</span><span style="color: #66cc66">)</span>;
<span style="font-weight: bold; color: #000000">?&gt;</span></pre>
<p>You get  the following message:<code>Warning: Missing argument 1 for test() in /usr/bin/- on line  2</code></p>
<p>The error message here is reported at the position of the definition of the  function, but really the error was in how the function was called. The required  parameter to test was not passed. This error can be annoying, forcing you to  consult a stack trace to find the actual error location. Something some  beginners may not know how to do.</p>
<p>However, if you run the same message in PHP 5 (tested on 5.2.2):</p>
<p><code>Warning: Missing argument 1 for test(), called in /Users/jeff/- on line  3 and defined in /Users/jeff/- on line 2</code></p>
<p>Sweet improvement!</p>
<p>One more reason to ditch PHP 4 and go php 5.</p></div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/improved-error-messages-in-php-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Common Login for phpBB3 and WordPress</title>
		<link>http://www.amityadav.name/test-post/</link>
		<comments>http://www.amityadav.name/test-post/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 19:37:16 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpbb]]></category>
		<category><![CDATA[single-login]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.amityadav.name/?p=4</guid>
		<description><![CDATA[I was just working on a site where i have to integrate phpBB3 and wordpress, i tried searching for things on internet but was not able to find a simple and feasible solution for the problem, so i thought of diving into the code and get things working on my own, and wow i got [...]]]></description>
			<content:encoded><![CDATA[<p>I was just working on a site where i have to integrate phpBB3 and wordpress, i tried searching for things on internet but was not able to find a simple and feasible solution for the problem, so i thought of diving into the code and get things working on my own, and wow i got success. Here are the function that you should call to start a phpBB and WordPress session.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.amityadav.name/wp-content/plugins/wp-codebox/wp-codebox.php?p=4&amp;download=auth_function.php">auth_function.php</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p48"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
</pre></td><td class="code" id="p4code8"><pre class="text" style="font-family:monospace;">function authenticateForumAdmin($username, $pass)
{
 global $dbObject, $user, $auth, $db;
&nbsp;
 $loginDetails = $auth-&gt;login($username, $pass, false, 1, 1);
&nbsp;
 if($loginDetails[&quot;error_msg&quot;] != &quot;&quot;)
 {
     return false;
 }else{
     return true;
 }
}
&nbsp;
&nbsp;
&nbsp;
function wp_authentication($username, $pass)
{
 global $_POST, $_COOKIE;
&nbsp;
 if (function_exists('get_userdatabylogin')) {
     $user = get_userdatabylogin($username);
&nbsp;
     if (! $user or $username != $user-&gt;user_login) {
	 if ((bool) get_option('http_authentication_auto_create_user')) {
	     // Create user and re-read from database for login (next step)
	     $this-&gt;create_user($username);
	     $user = get_userdatabylogin($username);
	 }
	 else {
	     // User is not in the WordPress database, and thus not authorized
	     die(&quot;User $username does not exist in the WordPress database&quot;);
	 }
     }
&nbsp;
     // Login the user by feeding WordPress a double-MD5 hash
     $password = md5($user-&gt;user_pass);
&nbsp;
     // User is now authorized; force WordPress to use the generated password
     $using_cookie = true;
     wp_setcookie($user-&gt;user_login, $password, $using_cookie);
 }
 else {
     die(&quot;Could not load user data&quot;);
 }
}</pre></td></tr></table></div>

<p>I am still looking for a single sign-on solution for phpBB3 and WordPress. Will post here once i am done with it.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.amityadav.name/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.amityadav.name/test-post/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>
