<?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>Programming Ideas, Logics, Tips and Tricks &#187; download</title>
	<atom:link href="http://www.sajithmr.me/tag/download/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sajithmr.me</link>
	<description></description>
	<lastBuildDate>Mon, 23 Jan 2012 15:44:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Algorithm for range of dates</title>
		<link>http://www.sajithmr.me/algorithm-for-range-of-dates</link>
		<comments>http://www.sajithmr.me/algorithm-for-range-of-dates#comments</comments>
		<pubDate>Wed, 12 May 2010 12:22:08 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[php source code]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[from date]]></category>
		<category><![CDATA[last 7 days]]></category>
		<category><![CDATA[last month]]></category>
		<category><![CDATA[last quarter]]></category>
		<category><![CDATA[last week]]></category>
		<category><![CDATA[php code]]></category>
		<category><![CDATA[range]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[this month]]></category>
		<category><![CDATA[this quarter]]></category>
		<category><![CDATA[this week]]></category>
		<category><![CDATA[this year]]></category>
		<category><![CDATA[to date]]></category>
		<category><![CDATA[today]]></category>
		<category><![CDATA[yesterday]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=691</guid>
		<description><![CDATA[Here is a php function which returns from and to date as an array for a range: &#60;?php function get_rangeof_dates($time_frame = &#8216;all_time&#8217;) { $from_date = &#8221;; $to_date = &#8221;; switch($time_frame) { case &#8216;all_time&#8217;:        $from_date = &#8217;1170-01-01 00:00:00&#8242;; $to_date = &#8217;2250-12-31 23:59:59&#8242;; break; case &#8216;today&#8217;: $from_date = date(&#8216;Y-m-d 00:00:00&#8242;); $to_date = date(&#8216;Y-m-d 23:59:59&#8242;); [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-709" title="calendar-icon" src="http://www.sajithmr.me/wp-content/uploads/2010/05/calendar-icon.png" alt="calendar-icon" width="256" height="256" /></p>
<p>Here is a php function which returns from and to date as an array for a range:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #bf2e9d;">&lt;?php</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #bf2e9d;"><span style="color: #000000;"><span style="color: #bf2e9d;">function</span> get_rangeof_dates($time_frame = <span style="font: 11.0px Menlo; color: #2832cf;">&#8216;all_time&#8217;</span>)</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = <span style="font: 11.0px Menlo; color: #2832cf;">&#8221;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = <span style="font: 11.0px Menlo; color: #2832cf;">&#8221;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"><span style="white-space: normal;"><span style="color: #bf2e9d;">switch</span>($time_frame)</span></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #2832cf;"><span style="color: #000000;"><span style="white-space: pre;"> </span></span><span style="color: #bf2e9d;">case</span><span style="color: #000000;"> </span><span style="font: 11.0px Menlo;">&#8216;all_time&#8217;</span><span style="color: #000000;">:        $from_date = </span><span style="font: 11.0px Menlo;">&#8217;1170-01-01 00:00:00&#8242;</span><span style="color: #000000;">;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span>$to_date = </span>&#8217;2250-12-31 23:59:59&#8242;<span style="font: 12.0px Menlo; color: #000000;">;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #2832cf;"><span style="color: #000000;"><span style="white-space: pre;"> </span></span><span style="color: #bf2e9d;">case</span><span style="color: #000000;"> </span><span style="font: 11.0px Menlo;">&#8216;today&#8217;</span><span style="color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;yesterday&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, time()- <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>, time()- <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;this_week&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, time() &#8211; (date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;w&#8217;</span>, time()) * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>, time() + ((<span style="font: 11.0px Menlo; color: #2832cf;">6</span> &#8211; date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;w&#8217;</span>, time())) * <span style="font: 11.0px Menlo; color: #2832cf;">60</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span> ));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;last_week&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, time() &#8211; (date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;w&#8217;</span>, time()) * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>) &#8211; <span style="font: 11.0px Menlo; color: #2832cf;">7</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>, time() + (( <span style="font: 11.0px Menlo; color: #2832cf;">6</span> &#8211; date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;w&#8217;</span>, time()) ) * <span style="font: 11.0px Menlo; color: #2832cf;">60</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span> ) &#8211; <span style="font: 11.0px Menlo; color: #2832cf;">7</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">case</span> <span style="font: 11.0px Menlo; color: #2832cf;">&#8216;last_7_days&#8217;</span>:     $additonal_query = <span style="font: 11.0px Menlo; color: #d62b24;">&#8220;created_at &gt; &#8216;&#8221;</span>.date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d&#8217;</span>, time()- <span style="font: 11.0px Menlo; color: #2832cf;">7</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> )<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #d62b24;">&#8220;&#8216;&#8221;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, time()- <span style="font: 11.0px Menlo; color: #2832cf;">7</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;this_month&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, mktime( <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;m&#8221;</span>)  , <span style="font: 11.0px Menlo; color: #2832cf;">1</span> , date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y&#8221;</span>) ) );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;last_month&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y-m-01 00:00:00&#8243;</span>, strtotime(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;-1 month&#8221;</span>, strtotime(date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y-m-d&#8221;</span>))));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y-m-d 23:59:59&#8243;</span>, strtotime(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;-1 day&#8221;</span>, strtotime(date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y-m-01&#8243;</span>))));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;last_30_days&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, time()- <span style="font: 11.0px Menlo; color: #2832cf;">30</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;this_quarter&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$month = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;m&#8217;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$year = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y&#8217;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">if</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">1</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">2</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">3</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-01-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-03-31&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">elseif</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">4</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">5</span>|| $month == <span style="font: 11.0px Menlo; color: #2832cf;">6</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-04-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-06-30&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">elseif</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">7</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">8</span>|| $month == <span style="font: 11.0px Menlo; color: #2832cf;">9</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-07-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-09-30&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">else</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-10-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-12-31&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;last_quarter&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$month = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;m&#8217;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$year = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y&#8217;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">if</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">1</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">2</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">3</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = ($year -<span style="font: 11.0px Menlo; color: #2832cf;">1</span>)<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-10-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = ($year-<span style="font: 11.0px Menlo; color: #2832cf;">1</span>)<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-12-31&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">elseif</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">4</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">5</span>|| $month == <span style="font: 11.0px Menlo; color: #2832cf;">6</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-01-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-03-31&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">elseif</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">7</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">8</span>|| $month == <span style="font: 11.0px Menlo; color: #2832cf;">9</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-04-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-06-30&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">else</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-07-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-09-30&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;this_year&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-01-01 00:00:00&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-12-31 23:59:59&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;last_year&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-01-01 00:00:00&#8242;</span>, mktime( <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">01</span> , <span style="font: 11.0px Menlo; color: #2832cf;">01</span> , date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y&#8221;</span>) &#8211; <span style="font: 11.0px Menlo; color: #2832cf;">1</span> ));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-12-31 23:59:59&#8242;</span>, mktime( <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">12</span> , <span style="font: 11.0px Menlo; color: #2832cf;">31</span> , date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y&#8221;</span>) &#8211; <span style="font: 11.0px Menlo; color: #2832cf;">1</span> ) );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">return</span> <span style="color: #bf2e9d;">array</span>($from_date, $to_date);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #bf2e9d;"><span style="color: #000000;"><span style="white-space: pre;"> </span></span>?&gt;</p>
<div><span style="font-family: Menlo, 'Times New Roman', 'Bitstream Charter', Times, serif; color: #bf2e9d; font-size: small;"><span style="line-height: normal;"><br />
</span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/algorithm-for-range-of-dates/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Contact Grabber</title>
		<link>http://www.sajithmr.me/contact-grabber</link>
		<comments>http://www.sajithmr.me/contact-grabber#comments</comments>
		<pubDate>Thu, 06 Nov 2008 10:55:51 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php source code]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[AOL]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[contact]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[fetch]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[grab]]></category>
		<category><![CDATA[grabber]]></category>
		<category><![CDATA[Hotmail]]></category>
		<category><![CDATA[Indiatimes]]></category>
		<category><![CDATA[Linkedin]]></category>
		<category><![CDATA[lycos]]></category>
		<category><![CDATA[MySpace]]></category>
		<category><![CDATA[orkut]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[Rediff]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/?p=353</guid>
		<description><![CDATA[If you are a social media website developer , sometimes you might search for grabbing contacts from a particular email account if the password is given. I also did the same.  In most of the cases it did not work properly. But recently i got a contact grabber from phpclasses.org which works perfectly on Gmail, [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a social media website developer , sometimes you might search for grabbing contacts from a particular email account if the password is given. I also did the same.  In most of the cases it did not work properly. But recently i got a contact grabber from <a href="http://www.phpclasses.org" target="_blank">phpclasses.org</a> which works perfectly on <strong>Gmail</strong>, <strong>Hotmail</strong>, <strong>Rediff</strong>, <strong>Yahoo</strong>, <strong>Orkut</strong>, <strong>MySpace</strong>, <strong>Indiatimes</strong>, <strong>Linkedin</strong> , <strong>AOL</strong> and <strong>lycos</strong></p>
<div id="attachment_355" class="wp-caption alignnone" style="width: 371px"><a href="http://www.sajithmr.com/wp-content/uploads/2008/11/grabber.jpg"><img class="size-full wp-image-355" title="Contact Grabber " src="http://www.sajithmr.com/wp-content/uploads/2008/11/grabber.jpg" alt="screen shot" width="361" height="225" /></a><p class="wp-caption-text">screen shot</p></div>
<p>But the zip file i got is not well arranged, so it shows some errors . I arranged it in proper way and uploaded here:</p>
<p><span style="text-decoration: underline;">Download:</span></p>
<p><a href="http://sajithmr.com/downloads/grabber.zip" target="_self"><img class="alignnone size-thumbnail wp-image-354" title="winzip_180x180" src="http://www.sajithmr.com/wp-content/uploads/2008/11/winzip_180x180-150x150.gif" alt="" width="98" height="98" /></a></p>
<p><a title="Contact Grabber" href="http://sajithmr.com/downloads/grabber.zip" target="_self">http://sajithmr.com/downloads/grabber.zip</a></p>
<p><span style="color: #808080;"><em>(Under GNU Public License)</em></span></p>
<p>Using this <strong>php code</strong> , you can <strong>export the email contacts</strong> as csv file.</p>
<p>Here is the actual source website : <a href="http://www.phpclasses.org/browse/package/3895.html" target="_blank">http://www.phpclasses.org/browse/package/3895.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/contact-grabber/feed</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Bypass your browser download to any accelerator (Flashgot)</title>
		<link>http://www.sajithmr.me/bypass-your-browser-download-to-any-accelerator-flashgot</link>
		<comments>http://www.sajithmr.me/bypass-your-browser-download-to-any-accelerator-flashgot#comments</comments>
		<pubDate>Mon, 27 Oct 2008 05:33:04 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[accelerator]]></category>
		<category><![CDATA[bypass]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[fast]]></category>
		<category><![CDATA[high speed]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/bypass-your-browser-download-to-any-accelerator-flashgot/</guid>
		<description><![CDATA[When ever we click on a downloadable file , our browser pop up a download window popup and ask us where to save. That download option does not have any other options like , limit the speed, scheduled download, download by split parts etc like what download accelerator like flashget does. In some cases we [...]]]></description>
			<content:encoded><![CDATA[<p>When ever we click on a downloadable file , our browser pop up a download window popup and ask us where to save. That download option does not have any other options like , limit the speed, scheduled download, download by split parts etc like what download accelerator like flashget does. In some cases we drag the link  (or click on download by flashget from context menu) to flashget for download using accelerator . But this is not possible in all the cases. Most of the downloads are not via direct link to the file, instead it points a dynamic web page (php or something), and it pops up the download option. Or sometimes there will be captcha to fill for download. In this case dragging to a accelerator is not possible.</p>
<p>The plugin which helped to do this is Mozilla&#8217;s <a href="https://addons.mozilla.org/en-US/firefox/addon/220" target="_blank">FlashGot </a>.What this plugin does is , it adds one more option for bypass the download from mozilla browser to some other accelerator say flashget.</p>
<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/10/flashgot.JPG" alt="FlashGot mozilla plugin" /></p>
<p>Might be some of you waiting  for such a solution for a long time , rite ?</p>
<p>Regards</p>
<p>Sajith</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/bypass-your-browser-download-to-any-accelerator-flashgot/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IDE for PHP, Ruby on Rails, Python and Javascript &#8211; Aptana</title>
		<link>http://www.sajithmr.me/ide-for-php-ruby-on-rails-python-and-javascript-aptana</link>
		<comments>http://www.sajithmr.me/ide-for-php-ruby-on-rails-python-and-javascript-aptana#comments</comments>
		<pubDate>Fri, 19 Sep 2008 04:08:34 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[webworld]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/ide-for-php-ruby-on-rails-python-and-javascript-aptana/</guid>
		<description><![CDATA[After a long searching, i got this IDE , Aptana which satisfies all my requirement. It is just like .net IDE with auto compiling and error displaying system, and come with built in server. You can download it from: http://aptana.com/studio/download Error display while coding time is its another feature. Auto filling is another feature. For [...]]]></description>
			<content:encoded><![CDATA[<p>After a long searching, i got this IDE , <a href="http://aptana.com/" title="Aptana" target="_blank">Aptana</a> which satisfies all my requirement. It is just like .net IDE with auto compiling and error displaying system, and come with built in server. You can download it from: <a href="http://aptana.com/studio/download" title="Aptana Download" target="_blank">http://aptana.com/studio/download</a></p>
<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/09/aptana.JPG" /></p>
<p>Error display while coding time is its another feature.</p>
<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/09/error1.JPG" /></p>
<p>Auto filling is another feature.</p>
<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/09/autocompletion.JPG" /></p>
<p>For oops concepts, it will show the details of method and its parameter while you start  a pointer (a dot . or -&gt; )</p>
<p>See example of javascript &#8220;document.getEle&#8221;  function.</p>
<p><img src="http://www.sajithmr.com/wp-content/uploads/2008/09/javascript.JPG" /></p>
<p>A lot of javascirpt buit-in libraries are included.</p>
<p>Features like, console, break point, watch etc are there . There is a special  Apatana Ajax Monitor to debug ajax calls.</p>
<p>Download it , and use it. I liked this one than dreamweaver or quanta or PHP Editor</p>
<p>More over the software Aptana is Free !!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/ide-for-php-ruby-on-rails-python-and-javascript-aptana/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Download Youtube Videos using PHP Code</title>
		<link>http://www.sajithmr.me/download-youtube-videos-using-php-code</link>
		<comments>http://www.sajithmr.me/download-youtube-videos-using-php-code#comments</comments>
		<pubDate>Thu, 29 May 2008 10:18:20 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[php source code]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[grabber]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/download-youtube-videos-using-php-code/</guid>
		<description><![CDATA[&#160; If you want to get the FLV file of any youtube video url using php code, here is the solution. If you are a PHP Programmer and if you are working with any video website, and if you need to grab videos (FLV files) from youtube and to put it yourown site (not object [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>If you want to get the FLV file of any youtube video url using <strong>php code</strong>, here is the solution.</p>
<blockquote><p>If you are a PHP Programmer and if you are working with any video website, and if you need to grab videos (FLV files) from youtube and to put it yourown site (not object embedding) , Download the Full Source Code given at the end of this article (ZIP)</p></blockquote>
<p>I used this php code for the <strong>Youtube video download</strong> tool <a href="http://www.googleneedle.com/" target="_blank">http://www.googleneedle.com</a></p>
<pre lang="php"></pre>
<p>Here function getPatternFromUrl is nothing but, get the exact pattern of a particular video from any youtube video url format.</p>
<p>In the above case , it returns <strong>pzmP4UvZRa4</strong></p>
<p>The function is below</p>
<pre lang="php">function getPatternFromUrl($url)

 {

$url = $url.'&amp;';

$pattern = '/v=(.+?)&amp;+/';

preg_match($pattern, $url, $matches);

return ($matches[1]);

}</pre>
<p>GetFlvFromYoutube is the main function here, which download the flv file from youtube pattern and saves to your local machine.<br />
The function is below:</p>
<pre lang="php">function GrabFlvFromYoutube( $pattern )
{

 require_once ("phptube.php");

 $tube = new PHPTube ();

 $flv_http_path = $tube-&gt;download($pattern) ;

 echo $flv_http_path;

 set_time_limit(0);

 $data = file_get_contents($flv_http_path);

 $new_flv_path = dirname(_FILE_).'/flvs/'.$pattern.'.flv' ;

 file_put_contents($new_flv_path, $data);

 return $new_flv_path ;

}</pre>
<p><span style="color: #008000;">Hey, the old script I wrote is not working as youtube constantly changing their way they serve the contents.</span></p>
<p><span style="color: #008000;">I updated googleneedle website with code from here: <a href="http://1chris.com/post/39/using-php-to-download-youtube-flvs/" target="_blank"><span style="color: #008000;">http://1chris.com/post/39/using-php-to-download-youtube-flvs/</span></a></span></p>
<p><span style="color: #008000;">It works now, thank you Chris</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/download-youtube-videos-using-php-code/feed</wfw:commentRss>
		<slash:comments>81</slash:comments>
		</item>
		<item>
		<title>Online Photoshop in PHP (Series Part 1)</title>
		<link>http://www.sajithmr.me/online-photoshop-in-php-series-part-1</link>
		<comments>http://www.sajithmr.me/online-photoshop-in-php-series-part-1#comments</comments>
		<pubDate>Tue, 20 May 2008 13:05:50 +0000</pubDate>
		<dc:creator>Mr Me</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[php source code]]></category>
		<category><![CDATA[clear all]]></category>
		<category><![CDATA[crop]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[resize]]></category>
		<category><![CDATA[round]]></category>
		<category><![CDATA[save]]></category>
		<category><![CDATA[undo]]></category>
		<category><![CDATA[watermark]]></category>

		<guid isPermaLink="false">http://www.sajithmr.com/online-photoshop-in-php-series-part-1/</guid>
		<description><![CDATA[Introduction &#62;&#62; As i announced in my birthday post: celebrating-1st-year-of-sajithmr.com , i am starting my post series How to make Photoshop Express in PHP Before we starting the step by step procedure, have a look at : http://www.sajithmr.me/photoshop/index.php This is a basic version of online photo editing tool. You can either upload a photo to [...]]]></description>
			<content:encoded><![CDATA[<h1><span style="color: #339966;">Introduction &gt;&gt;</span></h1>
<p><a title="Online Photo Editing Tool" href="http://www.sajithmr.com/photoshop/index.php" target="_blank"><img src="http://www.sajithmr.com/wp-content/uploads/2008/05/screenshot1.jpg" alt="Online Photoshop in PHP (Series Part 1)" width="346" height="328" /></a></p>
<p>As i announced in my birthday post: <a title="1st Happy Birthday" href="http://www.sajithmr.com/celebrating-1st-year-of-sajithmrcom/" target="_blank">celebrating-1st-year-of-sajithmr.com</a> , i am starting my post series  <span style="text-decoration: underline;">How to make Photoshop Express  in PHP</span></p>
<p>Before we starting the step by step procedure, have a look at : <a title="Online Photoshop" href="http://www.sajithmr.me/photoshop" target="_blank">http://www.sajithmr.me/photoshop/index.php</a></p>
<p><a style="margin: 10px; float: left" href="http://www.sajithmr.com/photoshop/index.php" target="_blank"><img src="http://www.sajithmr.com/wp-content/uploads/2008/05/logo2.jpg" alt="" /></a></p>
<p>This is a basic version of online photo editing tool.</p>
<p>You can either upload a photo to this tool or you can browse some images already supplied.</p>
<p>The basic features are:</p>
<ol>
<li>Crop</li>
<li>Resize</li>
<li>Water marking (Both logo and text)</li>
<li>Round corner</li>
<li>Rotate</li>
<li>Download and save</li>
</ol>
<p><span style="text-decoration: underline;"> Try yourself</span></p>
<p>Upload some picture (or browse any picture), Press crop button (top left), you can see orkut photo upload like crop there. You can select the area, or drag anywhere in the image. Press crop button in the workdesk. (Press F11 or fullscreen view for better performance )</p>
<p>Try all other features provided.</p>
<p>The whole site is divided into four parts.</p>
<ol>
<li>Tools</li>
<li>Work Desk</li>
<li>Browse Photos</li>
<li>Settings</li>
</ol>
<p><strong>Tools area</strong> contains options for <span style="text-decoration: underline;">crop,</span> <span style="text-decoration: underline;">resize</span>, <span style="text-decoration: underline;">watermark,</span> <span style="text-decoration: underline;">round</span>, <span style="text-decoration: underline;">undo</span> , <span style="text-decoration: underline;">save,</span> <span style="text-decoration: underline;">clear all</span>, <span style="text-decoration: underline;">download</span>.</p>
<p><a href="http://www.sajithmr.com/photoshop/index.php" target="_blank"><img src="http://www.sajithmr.com/wp-content/uploads/2008/05/tool.jpg" alt="" /></a></p>
<p>Here <strong>&#8216;clear all&#8217;</strong> reset all the operations and navigate the website into initial settings.</p>
<p>From the <strong>Settings Area</strong>, You can fix the angle of the image. You can rotate either clock-wise or anti-clock-wise depending on the angle provided (+ve or -ve)</p>
<p><a href="http://www.sajithmr.com/photoshop/index.php" target="_blank"><img src="http://www.sajithmr.com/wp-content/uploads/2008/05/setting.jpg" alt="" /></a></p>
<p>In  <strong>Text Water Mark Setting Area</strong>, you can enter a text, set font size and font color. It generates a pictures corresponding to your text. Click water mark button in tool area and fix the position , press <strong>Apply Watermark </strong></p>
<p>You can also upload your water mark logo.</p>
<p>Finally you can download the edited picture by clicking download button in the Tool area (top right) .</p>
<p>The interesting thing is the whole website / tool is created in a single day.</p>
<p>wanna learn how to implement this ??</p>
<p>Keep reading rest of the series.</p>
<p>In <span style="color: #99cc00;"><span style="text-decoration: underline;"><strong>Online Photoshop in PHP (Series Part 2)</strong> </span></span> &gt;&gt; <span style="color: #ff6600;">Implementation of the <strong>Browse Photos</strong> Area</span></p>
<p>Thanks and Regards<br />
Sajith M.R</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/online-photoshop-in-php-series-part-1/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

