<?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"
	>

<channel>
	<title>Md Emran Hasan aka phpfour</title>
	<atom:link href="http://www.phpfour.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpfour.com/blog</link>
	<description>Views, ideas, &#038; sharing of PHP, CSS, XHTML, JavaScript, Web 2.0, AJAX, Usability, and Web Standards related matters.</description>
	<pubDate>Sun, 27 Apr 2008 15:34:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Power situation in Bangladesh</title>
		<link>http://www.phpfour.com/blog/2008/04/27/power-situation-bd/</link>
		<comments>http://www.phpfour.com/blog/2008/04/27/power-situation-bd/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 15:30:02 +0000</pubDate>
		<dc:creator>Emran Hasan</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[exciting]]></category>

		<guid isPermaLink="false">http://www.phpfour.com/blog/?p=102</guid>
		<description><![CDATA[Nothing to say much, check the image below:
Utilizing boring time during load shedding hours 

]]></description>
			<content:encoded><![CDATA[<p>Nothing to say much, check the image below:</p>
<p><center><strong>Utilizing boring time during load shedding hours</strong></center> </p>
<p><img src="http://www.phpfour.com/blog/wp-content/uploads/2008/04/image003.gif" alt="Power line in BD" title="Power line in BD" width="550" height="430" class="alignnone size-full wp-image-103" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpfour.com/blog/2008/04/27/power-situation-bd/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jQuery Essentials - Round 3</title>
		<link>http://www.phpfour.com/blog/2008/03/06/jquery-essentials-round-3/</link>
		<comments>http://www.phpfour.com/blog/2008/03/06/jquery-essentials-round-3/#comments</comments>
		<pubDate>Thu, 06 Mar 2008 13:52:15 +0000</pubDate>
		<dc:creator>Emran Hasan</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[collection]]></category>

		<category><![CDATA[essentials]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://www.phpfour.com/blog/2008/03/06/jquery-essentials-round-3/</guid>
		<description><![CDATA[I still receive a good number of hits to my first (10 jQuery Essentials) and second (jQuery Essentials - Round 2) collection of jQuery plugins. So, I have been thinking about making the next post in the series for quite some time. Time has always been the killer of ideas, along with the fact that [...]]]></description>
			<content:encoded><![CDATA[<p>I still receive a good number of hits to my first (<a href="http://www.phpfour.com/blog/2007/06/30/jquery-essentials/" target="_blank">10 jQuery Essentials</a>) and second (<a href="http://www.phpfour.com/blog/2007/07/28/jquery-essentials-round-2/" target="_blank">jQuery Essentials - Round 2</a>) collection of jQuery plugins. So, I have been thinking about making the next post in the series for quite some time. Time has always been the killer of ideas, along with the fact that not too many plugins found way to my list of favorites. </p>
<p>Now that I have some fresh essentials, this post was inevitable.</p>
<p><a href="http://ui.jquery.com/" target="_blank">18. jQuery UI</a></p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="102" alt="ui" src="http://www.phpfour.com/blog/wp-content/uploads/2008/03/windowslivewriterjqueryessentialsround3-11100ui-3.png" width="244" border="0"> </p>
<p>This is the official big boss with a number of core interactions (drag, dropping, sorting, selecting, resizing) and few great widgets (accordions, date pickers, dialogs, sliders, tabs) built on top of those. Although its a great collection, I somehow haven&#8217;t been able to use it in any real projects yet. It seems small plugins always get a favor than big collections <img src='http://www.phpfour.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://famspam.com/facebox" target="_blank">19. Facebox</a></p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="63" alt="facebox" src="http://www.phpfour.com/blog/wp-content/uploads/2008/03/windowslivewriterjqueryessentialsround3-11100facebox-3.png" width="244" border="0"> </p>
<p>This is a cute, little plugin that shows Facebook style dialog boxes using jQuery. It supports nearly all the possible contents you might want to show in a dialog box: image, div, remote pages. It has both automatic behavior and manual invoking. Simple and fun to me.</p>
<p><a href="http://plugins.jquery.com/project/pagination" target="_blank">20. Pagination</a></p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="56" alt="pagination" src="http://www.phpfour.com/blog/wp-content/uploads/2008/03/windowslivewriterjqueryessentialsround3-11100pagination-3.png" width="244" border="0"> </p>
<p>Although we generate pagination mostly from back-end and display them in our pages, sometimes AJAX paginations are needed. This plugin outputs a superb pagination display to be used in such cases. If you know the usability issues regarding pagination and can distinguish between bad and good paginations, then you&#8217;ll find that this one has all the good in it. Check out their demo to know what I mean.</p>
<p><a href="http://reconstrukt.com/ingrid/" target="_blank">21. Ingrid, the jQuery Datagrid</a></p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="155" alt="ingrid" src="http://www.phpfour.com/blog/wp-content/uploads/2008/03/windowslivewriterjqueryessentialsround3-11100ingrid-3.png" width="318" border="0"> </p>
<p>&#8220;Datagrids don&#8217;t have to be difficult to use anymore - say hi to Ingrid. Ingrid is an unobtrusive jQuery component that adds Data Grid behaviors (column resizing, paging, sorting, row and column styling, and more) to your tables.&#8221; - I can&#8217;t agree more on their say. It&#8217;s truly an excellent implementation of grid. And it makes conversion of normal tables to grids very easy.</p>
<p><a href="http://bijon.rightbrainsolution.com/youtube/" target="_blank">22. jQuery Youtube</a> </p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="188" alt="youtube" src="http://www.phpfour.com/blog/wp-content/uploads/2008/03/windowslivewriterjqueryessentialsround3-11100youtube-3.png" width="244" border="0"> </p>
<p>If you have any need to retrieve and show Youtube videos in your site, this plugin will be a life-saver. Specify a few properties and this plugin will fetch the videos utilizing the new GData API from Google. And the author makes an unique display of the thumbnails, but combining it with <a href="http://www.malsup.com/jquery/block/" target="_blank">BlockUI</a> - so when you click on a retrieved video, you have it in a modal for preview.</p>
<p><a href="http://www.ndoherty.com/demos/coda-slider/1.1.1/" target="_blank">23. Coda Slider</a></p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="157" alt="coda" src="http://www.phpfour.com/blog/wp-content/uploads/2008/03/windowslivewriterjqueryessentialsround3-11100coda-3.png" width="244" border="0"> </p>
<p>I am a huge fan of Coda Slider. It&#8217;s a slider plugin for jQuery and is much better than many other sliders out there. It has a pile of properties and display options to play with. I have been able to customize and use it in every possible need, so there is a chance it helps you out also. Supports custom height, width, tabs on top/bottom, without tabs, custom arrows, &#8230; and a lot more.</p>
<p><a href="http://leandrovieira.com/projects/jquery/lightbox/" target="_blank">24. jQuery Lightbox</a></p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="203" alt="lightbox" src="http://www.phpfour.com/blog/wp-content/uploads/2008/03/windowslivewriterjqueryessentialsround3-11100lightbox-3.png" width="244" border="0"> </p>
<p>The prototyped lightbox was very popular and I used it in a couple occasions. But since I&#8217;ve switched to jQuery, I hardly found any replacement for that. <a href="http://jquery.com/demo/thickbox/" target="_blank">Thickbox</a> and a couple other tried (and they were very good implementation), but couldn&#8217;t make me feel the same way. Suddenly I found this one and I knew its the one. A one-liner implementation and all the features from my previous fav is back. It has a number of customization also, if you need to modify the way it behaves. </p>
<p><a href="http://nodstrum.com/2007/09/19/autocompleter/" target="_blank">25. Auto Completer</a></p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="170" alt="auto" src="http://www.phpfour.com/blog/wp-content/uploads/2008/03/windowslivewriterjqueryessentialsround3-11100auto-3.png" width="244" border="0"> </p>
<p>Auto-completes have been there and I mentioned some great ones in my previous posts, but this one has also captured my attention and I like it very much. The author has gone a few extra miles and has explained the inner workings of the plugin. But if you just want to try it out, you can check the demo.</p>
<h3>Categorized jQuery Essentials</h3>
<p>A lot of people have asked me to categorize the posts so that it&#8217;s easy to pick for them. I waited for this post before doing that so I will do a categorized post of the cumulative list of plugins from the 3 posts in the series. </p>
<p>Happy jQuery !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpfour.com/blog/2008/03/06/jquery-essentials-round-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cross-Domain AJAX calls using PHP</title>
		<link>http://www.phpfour.com/blog/2008/03/06/cross-domain-ajax-using-php/</link>
		<comments>http://www.phpfour.com/blog/2008/03/06/cross-domain-ajax-using-php/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 20:09:41 +0000</pubDate>
		<dc:creator>Emran Hasan</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[ajax]]></category>

		<category><![CDATA[cross-domain]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[proxy]]></category>

		<category><![CDATA[solution]]></category>

		<category><![CDATA[transport]]></category>

		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.phpfour.com/blog/2008/03/06/cross-domain-ajax-using-php/</guid>
		<description><![CDATA[AJAX has become the core component of many web applications around us. And its fairly easy to handle AJAX now a days, with the help of various javascript libraries (ex: jQuery, Prototype, Mootools, YUI, etc). But there is one security issue that web browsers impose in doing AJAX calls - they don&#8217;t let you do [...]]]></description>
			<content:encoded><![CDATA[<p>AJAX has become the core component of many web applications around us. And its fairly easy to handle AJAX now a days, with the help of various javascript libraries (ex: <a href="http://jquery.com" target="_blank">jQuery</a>, <a href="http://www.prototypejs.org/" target="_blank">Prototype</a>, <a href="http://www.mootools.net/" target="_blank">Mootools</a>, <a href="http://developer.yahoo.com/yui/" target="_blank">YUI</a>, etc). But there is one security issue that web browsers impose in doing AJAX calls - they don&#8217;t let you do AJAX calls in web servers different than yours. That means, if your script is in <a href="http://www.mydomain.com">www.mydomain.com</a> and you&#8217;re trying to do AJAX call to <a href="http://www.anotherdomain.com/get.php">www.anotherdomain.com/get.php</a>, then the browser will through error like: &#8220;Error: uncaught exception: Permission denied to call method XMLHttpRequest.open&#8221;. </p>
<p>Now, there are a number of solutions to this problem. Instead of explaining them all to you, lemme provide you the simplest one: using a PHP transport file. If you already know the thing and just need the script, <strong>download from </strong><strong><a title="Download transport.php" href="http://www.phpfour.com/blog/downloads/transport" target="_blank">here</a></strong>. </p>
<p>Others, let&#8217;s see an example implementation first.</p>
<h3>Example use</h3>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> xmlHttp.onreadystatechange=<span style="color: #0000ff">function</span>()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     <span style="color: #0000ff">if</span>(xmlHttp.readyState==4)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>         alert(xmlHttp.responseText);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>     }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span> }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span> xmlHttp.open(<span style="color: #006080">&#8220;GET&#8221;</span>, <span style="color: #006080">&#8216;http://myserver.com/transport.php?action=&#8217;</span> + </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>                     urlencode(<span style="color: #006080">&#8216;different-server.com/return_call.php&#8217;</span>) +</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>                     <span style="color: #006080">&#8216;&amp;method=get&amp;data1=101&amp;data2=pass&#8217;</span>, <span style="color: #0000ff">true</span> );</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span> xmlHttp.send(<span style="color: #0000ff">null</span>);</pre>
</div>
</div>
<p>Now, lets see how it works:</p>
<ol>
<li>The script makes an AJAX call to the <strong>myserver.com/transport.php</strong> with a few parameters:
<ul>
<li><strong>action </strong>= the target URL you need to fetch, from a different domain
<li><strong>method</strong> = the HTTP method (post/get)
<li><strong>data1, data2 </strong>= sample parameters for using as either query-string or POST fields</li>
</ul>
<li>When the request is received by <strong>transport.php</strong>, it uses cURL to make a call to the page mentioned in action.
<li>Based on the method, it either makes a GET request or a POST request. In both cases, it sends the extra parameters that are sent.
<li>After the response is received, <strong>transport.php</strong> echoes it. So, you have what you need!</li>
</ol>
<h3>Download</h3>
<table cellspacing="0" cellpadding="2" width="698" border="0">
<tbody>
<tr>
<td width="42"><a title="Download transport.php" href="http://www.phpfour.com/blog/downloads/transport" target="_blank"><img src="http://www.phpfour.com/images/download.gif"></a></td>
<td width="650"><strong>transport.php</strong><br />Cross-Domain AJAX call transporter.<br />Downloaded: 806 times</td>
</tr>
</tbody>
</table>
<p>Comments and suggestions are most welcomed <img src='http://www.phpfour.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpfour.com/blog/2008/03/06/cross-domain-ajax-using-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>i-mate™ PDA2k</title>
		<link>http://www.phpfour.com/blog/2008/02/10/i-mate%e2%84%a2-pda2k/</link>
		<comments>http://www.phpfour.com/blog/2008/02/10/i-mate%e2%84%a2-pda2k/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 19:41:28 +0000</pubDate>
		<dc:creator>Emran Hasan</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Mobile phone]]></category>

		<category><![CDATA[RBS]]></category>

		<category><![CDATA[company]]></category>

		<category><![CDATA[essential]]></category>

		<category><![CDATA[mobile]]></category>

		<category><![CDATA[pda]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.phpfour.com/blog/2008/02/10/i-mate%e2%84%a2-pda2k/</guid>
		<description><![CDATA[
I have been feeling the need of a business PDA for the last couple months, but couldn&#8217;t find one that would balance both my desire of functionality and the budget constraint. I wanted to keep my schedule handy, arrange my daily tasks properly, listen to music on the go, browse internet and read emails, use [...]]]></description>
			<content:encoded><![CDATA[<p><a href='www.clubimate.com/t-DETAILS_PDA2K.aspx' title='i-mate PDA2k'><img src='http://www.phpfour.com/blog/wp-content/uploads/2008/02/imate_pda2k.jpg' alt='i-mate PDA2k' align='left' style="margin-right:10px;" /></a></p>
<p>I have been feeling the need of a business PDA for the last couple months, but couldn&#8217;t find one that would balance both my desire of functionality and the budget constraint. I wanted to keep my schedule handy, arrange my daily tasks properly, listen to music on the go, browse internet and read emails, use standard phone functionalities and take occasional photos - a lot to ask from a PDA. With all these features combined, the available PDAs in the market was hitting 50K BDT in price - something way over my budget. So, I was a bit disappointed.</p>
<p>Then a few weeks back, one of my junior friends Abir, knocked me in IM and asked whether I am interested in buying a PDA that has not been used much and in great condition. He mentioned that it has camera, phone, and PDA functions - so I didn&#8217;t hesitate much and asked for the model he had - it was <a href='http://www.clubimate.com/t-DETAILS_PDA2K.aspx' title='i-mate PDA2k'>i-mate™ PDA2k</a>. After a quick review over the internet, i realized that its the perfect combination I was looking for! I asked for the price and for a surprising 20K BDT, i got that beautiful piece in my hand today! <img src='http://www.phpfour.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><br clear="all" /><br />
For the technology lovers, here goes the spec from the manufacturer:</p>
<ul>
<li><strong>Platform </strong>- Windows Mobile™ Pocket PC 2003 Phone Edition Software (GSM/GPRS).</li>
<li><strong>Display </strong>- 3.5”, Transflective TFT-LCD 240 x 320 pixels, 64K Color</li>
<li><strong>Processor </strong>- Intel XScale, 400 MHz</li>
<li><strong>Memory </strong>- 64/128 MB ROM/RAM</li>
<li><strong>Internal antenna</strong>, Quad-band, GSM/GPRS 850/900/1800/1900</li>
<li><strong>GPRS </strong>class B, multi-slot class 10; Codec - AMR/EFR/FR/HR</li>
<li><strong>Bluetooth</strong>, Integrated WLAN 802.11b</li>
<li><strong>Camera </strong>-Color CMOS VGA (640&#215;480) camera/ flash light</li>
<li><strong>Keyboard</strong>- Integrated 39-key QWERTY keyboard</li>
<li><strong>Infrared </strong>- IrDA SIR/ USB slave 1.1</li>
<li><strong>Expansion</strong>- MMC/SDIO</li>
</ul>
<p>I have high hope that it will be serving me with the functions i desire most !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpfour.com/blog/2008/02/10/i-mate%e2%84%a2-pda2k/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HTTP Class for PHP (supports both cURL and fsockopen)</title>
		<link>http://www.phpfour.com/blog/2008/01/20/php-http-class/</link>
		<comments>http://www.phpfour.com/blog/2008/01/20/php-http-class/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 14:26:50 +0000</pubDate>
		<dc:creator>Emran Hasan</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[class]]></category>

		<category><![CDATA[curl]]></category>

		<category><![CDATA[emran]]></category>

		<category><![CDATA[hasan]]></category>

		<category><![CDATA[http]]></category>

		<category><![CDATA[REST]]></category>

		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.phpfour.com/blog/2008/01/20/php-http-class/</guid>
		<description><![CDATA[This is a wrapper HTTP class that uses either cURL or fsockopen to harvest resources from the web. It supports a handy subset of functionalists of HTTP that are mostly needed in day to day coding. Scripts who need to communicate with other servers will find it useful. If you&#8217;re looking to invoke any RESTful [...]]]></description>
			<content:encoded><![CDATA[<p>This is a wrapper HTTP class that uses either <strong>cURL</strong> or <strong>fsockopen</strong> to harvest resources from the web. It supports a handy subset of functionalists of HTTP that are mostly needed in day to day coding. Scripts who need to communicate with other servers will find it useful. If you&#8217;re looking to invoke any <strong>RESTful </strong>API and don&#8217;t want to bother adding a bunch of libraries for that simple thing, just put this class and you&#8217;re set.</p>
<p>Detailed documentation can be found <a href="http://www.phpfour.com/lib/http" target="_blank">here</a>. And you can download the source from <a href="http://www.phpfour.com/blog/downloads/http-class" target="_blank">here</a>.</p>
<p><strong>UPDATE:</strong> Class added in <a href="http://www.orchidframework.net/">Orchid - &#8220;PHP framwork for the rest of us&#8221;</a></p>
<h3>Features</h3>
<ul>
<li>Can use both cURL and fsockopen.
<li>Degrades to fsockopen if cURL not enabled.
<li>Supports HTTP Basic authentication.
<li>Supports defining custom request headers.
<li>Supports defining connection timeout values.
<li>Supports defining user agent and referral values.
<li>Supports both user-defined and persistent cookies.
<li>Supports secure connections (HTTPS) with and without cURL.
<li>Supports adding requests parameters for both GET and POST.
<li>Supports automatic redirection (maximum redirect can be defined).
<li>Returns HTTP response headers and response body data separately. </li>
</ul>
<h3>Example 1 - Simple Get (Facebook Application List)</h3>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> &lt;?php</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> include_once(<span style="color: #006080">&#8216;class.http.php&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> $http = <span style="color: #0000ff">new</span> Http();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span> $http-&gt;execute(<span style="color: #006080">&#8216;http://www.facebook.com/apps/index.php?sort=6&#8242;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span> echo ($http-&gt;error) ? $http-&gt;error : $http-&gt;result;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span> ?&gt;</pre>
</div>
</div>
<h3>Example 2 - Invoking Yahoo Term Extraction API</h3>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> &lt;?php</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> include_once(<span style="color: #006080">&#8216;class.http.php&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> $http = <span style="color: #0000ff">new</span> Http();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span> $http-&gt;addParam(<span style="color: #006080">&#8216;appid&#8217;</span>   , <span style="color: #006080">&#8216;a_really_random_yahoo_app_id&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span> $http-&gt;addParam(<span style="color: #006080">&#8216;context&#8217;</span> , <span style="color: #006080">&#8216;I am happy because I bought a new car&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span> $http-&gt;addParam(<span style="color: #006080">&#8216;output&#8217;</span>  , <span style="color: #006080">&#8216;xml&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>                         </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span> $http-&gt;execute(<span style="color: #006080">&#8216;http://search.yahooapis.com/ContentAnalysisService/V1/termExtraction&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span> echo ($http-&gt;error) ? $http-&gt;error : $http-&gt;result;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span> ?&gt;</pre>
</div>
</div>
<h3>Example 3 - Logging into Basecamp (without using cURL!)</h3>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> &lt;?php</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> include_once(<span style="color: #006080">&#8216;class.http.php&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> $http = <span style="color: #0000ff">new</span> Http();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span> $http-&gt;useCurl(<span style="color: #0000ff">false</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span> $http-&gt;setMethod(<span style="color: #006080">&#8216;POST&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span> $http-&gt;addParam(<span style="color: #006080">&#8216;user_name&#8217;</span>, <span style="color: #006080">&#8216;emran&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span> $http-&gt;addParam(<span style="color: #006080">&#8216;password&#8217;</span>, <span style="color: #006080">&#8216;hasan&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span> $http-&gt;setReferrer(<span style="color: #006080">&#8216;https://someproject.projectpath.com/login&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span> $http-&gt;execute(<span style="color: #006080">&#8216;https://someproject.projectpath.com/login/authenticate&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span> echo ($http-&gt;error) ? $http-&gt;error : $http-&gt;result;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span> ?&gt;</pre>
</div>
</div>
<h3>Example 4 - Getting a protected feed</h3>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> &lt;?php</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> include_once(<span style="color: #006080">&#8216;class.http.php&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span> $http = <span style="color: #0000ff">new</span> Http();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> $http-&gt;setAuth(<span style="color: #006080">&#8216;emran&#8217;</span>, <span style="color: #006080">&#8216;hasan&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span> $http-&gt;execute(<span style="color: #006080">&#8216;http://www.someblog.com/protected/feed.xml&#8217;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span> echo ($http-&gt;error) ? $http-&gt;error : $http-&gt;result;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>&nbsp; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span> ?&gt;</pre>
</div>
</div>
<h3>Download</h3>
<table cellspacing="0" cellpadding="2" width="698" border="0">
<tbody>
<tr>
<td width="42"><a title="Download transport.php" href="http://www.phpfour.com/blog/downloads/http-class" target="_blank"><img src="http://www.phpfour.com/images/download.gif"></a></td>
<td width="650"><strong>class.http.php</strong><br />HTTP Class for PHP (supports both cURL and fsockopen)<br />Downloaded: <strong>983</strong> times</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.phpfour.com/blog/2008/01/20/php-http-class/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New year ahead!</title>
		<link>http://www.phpfour.com/blog/2008/01/20/new-year-ahead/</link>
		<comments>http://www.phpfour.com/blog/2008/01/20/new-year-ahead/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 18:39:48 +0000</pubDate>
		<dc:creator>Emran Hasan</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[2008]]></category>

		<category><![CDATA[commitments]]></category>

		<category><![CDATA[facebook]]></category>

		<category><![CDATA[mba]]></category>

		<category><![CDATA[orchid]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[zce]]></category>

		<guid isPermaLink="false">http://www.phpfour.com/blog/2008/01/20/new-year-ahead/</guid>
		<description><![CDATA[Although its a bit late to post a &#34;happy new year&#34; entry, I want to thank all the visitors who paid a visit to my blog last year and wish you a Happy New Year ahead. It&#8217;s been a great year with many ups &#38; downs in my life, alas my short term memory won&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Although its a bit late to post a &quot;happy new year&quot; entry, I want to thank all the visitors who paid a visit to my blog last year and wish you a <strong>Happy New Year</strong> ahead. It&#8217;s been a great year with many ups &amp; downs in my life, alas my short term memory won&#8217;t allow me to write a post like <a href="http://hasin.wordpress.com/2008/01/04/lookback-2007-the-storyteller/" target="_blank">Hasin</a>. Nevertheless, I am finally enjoying a planned life with time for my job, my company, my family and most important - myself !!!</p>
<p>Last year I set a number of goals - some were achieved and some were not. This year, I want to pressurize myself a bit by keeping those goals public in my blog. This will push me to walk in the right path as people will often ask about them and many of them won&#8217;t accept excuses. So, here goes my public commitment for 2008:</p>
<ul>
<li>I will start my Masters in Business Administration (MBA)</li>
<li>I will sit (and will hopefully pass!) the <a href="http://www.zend.com/en/services/certification/" target="_blank">Zend Certified Engineer (ZCE)</a> exam for PHP5</li>
<li>I will write at least 4 posts per month (48 in the year - a lot considering my track record!)</li>
<li>I will be working with a number of libraries in <a href="http://www.orchidframework.com/" target="_blank">Orchid framework</a></li>
<li>I will release at least one Facebook App (personally, not from my job!)</li>
</ul>
<p>And yeah, I&#8217;ve changed the blog theme, thanks goes to <a href="http://www.dezinerfolio.com" target="_blank">Dezinerfolio</a> - i was looking for a dark theme for a long time. I did some modification to their theme, and added a pagination like them. Hope you guys enjoy it more. Drop me a line if you have any ideas, suggestions, views, complaints - anything!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpfour.com/blog/2008/01/20/new-year-ahead/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Launch of Right Brain Solution Ltd.&#8217;s website!</title>
		<link>http://www.phpfour.com/blog/2007/11/09/launch-of-right-brain-solution-ltds-website/</link>
		<comments>http://www.phpfour.com/blog/2007/11/09/launch-of-right-brain-solution-ltds-website/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 19:46:56 +0000</pubDate>
		<dc:creator>Emran Hasan</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[RBS]]></category>

		<category><![CDATA[application]]></category>

		<category><![CDATA[company]]></category>

		<category><![CDATA[emran]]></category>

		<category><![CDATA[portfolio]]></category>

		<category><![CDATA[solution]]></category>

		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.phpfour.com/blog/2007/11/09/launch-of-right-brain-solution-ltds-website/</guid>
		<description><![CDATA[
I would like to let you all know that we&#8217;ve just launched the new website of Right Brain Solution Ltd.. I would like to personally thank all our friends, families, associates, and well-wishers - for all their support and patience.
Please have a look at the site and let us know your views, comments, ideas, criticism [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.rightbrainsolution.com"><img src="http://www.rightbrainsolution.com/images/rbs_shot.png" title="Right Brain Solution Ltd." border="0" /></a></p>
<p>I would like to let you all know that we&#8217;ve just launched the new website of <a href="http://www.rightbrainsolution.com">Right Brain Solution Ltd.</a>. I would like to personally thank all our friends, families, associates, and well-wishers - for all their support and patience.</p>
<p>Please have a look at the site and let us know your views, comments, ideas, criticism - anything that you would like to share with us.</p>
<p>Thank you all!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpfour.com/blog/2007/11/09/launch-of-right-brain-solution-ltds-website/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Trippert, here I come!</title>
		<link>http://www.phpfour.com/blog/2007/11/06/trippert-here-i-come/</link>
		<comments>http://www.phpfour.com/blog/2007/11/06/trippert-here-i-come/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 15:12:38 +0000</pubDate>
		<dc:creator>Emran Hasan</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[exciting]]></category>

		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[job]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[trippert]]></category>

		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.phpfour.com/blog/2007/11/06/trippert-here-i-come/</guid>
		<description><![CDATA[
I am going to take some of my time out from my regular job as CTO of Right Brain Solution Ltd. and will work at Trippert, Inc. as Development Manager, starting from this month. My primary responsibilities will include software development and project management on various company projects.
I am very excited about working with Trippert [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="Trippert Inc" src="http://www.trippert.com/img/trippert_beta_logo.png" /></p>
<p>I am going to take some of my time out from my regular job as <strong>CTO </strong>of <a href="http://www.rightbrainsolution.com">Right Brain Solution Ltd.</a> and will work at <a href="http://www.trippert.com">Trippert, Inc.</a> as <strong>Development Manager</strong>, starting from this month. My primary responsibilities will include software development and project management on various company projects.</p>
<p>I am very excited about working with Trippert as many of the developers there are known to me and I highly regard their work. Also, teaming up again with <a href="http://hasin.wordpress.com">Hasin</a> is a great thing (we worked together before in <a href="http://www.somewherein.net">Somewhere in&#8230;</a> and <a href="http://www.pageflakes.com">Pageflakes</a>). I hope to enjoy this journey a lot !</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpfour.com/blog/2007/11/06/trippert-here-i-come/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Turning local open_basedir off</title>
		<link>http://www.phpfour.com/blog/2007/10/12/turning-local-open_basedir-off/</link>
		<comments>http://www.phpfour.com/blog/2007/10/12/turning-local-open_basedir-off/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 22:08:55 +0000</pubDate>
		<dc:creator>Emran Hasan</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[configuration]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.phpfour.com/blog/2007/10/12/turning-local-open_basedir-off/</guid>
		<description><![CDATA[I have been trying to remove the open_basedir directive from my php configuration to allow seamless CURL operation in my server (Plesk based). 
As the first step, I edited the /etc/php.ini file and set the directive to none. It made the master value for open_basedir to none. But even if, the local value is set [...]]]></description>
			<content:encoded><![CDATA[<p>I have been trying to remove the open_basedir directive from my php configuration to allow seamless CURL operation in my server (Plesk based). </p>
<p>As the first step, I edited the /etc/php.ini file and set the directive to none. It made the master value for open_basedir to none. But even if, the local value is set and was causing enough trouble. </p>
<p>I googled it, carried out a few methods, but nothing worked. The last try got me the result I needed:</p>
<p>1. Created a new httpd.conf file in my domains conf folder: /var/www/vhosts/mydomain.org/conf</p>
<p>2. Put the following lines there:<br />
<code><br />
&lt;Directory /var/www/vhosts/mydomain.org/httpdocs&gt;<br />
php_admin_value open_basedir "none"<br />
&lt;/Directory&gt;<br />
</code></p>
<p>3. Updated Plesk configuration: # /usr/local/psa/admin/sbin/websrvmng -v -a</p>
<p>4. Restarted apache: apachectl restart</p>
<p>5. Voila!</p>
<p>I hope this helps somebody out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpfour.com/blog/2007/10/12/turning-local-open_basedir-off/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Inspiration</title>
		<link>http://www.phpfour.com/blog/2007/09/23/inspiration/</link>
		<comments>http://www.phpfour.com/blog/2007/09/23/inspiration/#comments</comments>
		<pubDate>Sun, 23 Sep 2007 10:02:51 +0000</pubDate>
		<dc:creator>Emran Hasan</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[guideline]]></category>

		<category><![CDATA[inspiration]]></category>

		<category><![CDATA[message]]></category>

		<guid isPermaLink="false">http://www.phpfour.com/blog/2007/09/23/inspiration/</guid>
		<description><![CDATA[I have been meeting some people lately who are confused with their life - not sure what they should do, not sure whether they are in the right path and very often, not sure what to do next. Having these thoughts in mind makes one&#8217;s life miserable, and they need someone to guide them. 
I [...]]]></description>
			<content:encoded><![CDATA[<p>I have been meeting some people lately who are confused with their life - not sure what they should do, not sure whether they are in the right path and very often, not sure what to do next. Having these thoughts in mind makes one&#8217;s life miserable, and they need someone to guide them. </p>
<p>I feel that the following Commencement address by Steve Jobs should be the first they see. In this speech, Jobs only spoke about three stories of his life - but you can learn the secret from these - trusting in yourself. I&#8217;ve included the written form of the whole speech also, in case you cannot have enough internet speed to watch the video.</p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/D1R-jKKp3NA"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/D1R-jKKp3NA" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></p>
<p><strong>&#8220;You&#8217;ve got to find what you love&#8221;, Jobs says, Stanford Report, June 14, 2005</strong></p>
<p><span id="more-64"></span></p>
<p>This is the text of the Commencement address by Steve Jobs, CEO of Apple Computer and of Pixar Animation Studios, delivered on June 12, 2005.</p>
<p>I am honored to be with you today at your commencement from one of the finest universities in the world. I never graduated from college. Truth be told, this is the closest I&#8217;ve ever gotten to a college graduation. Today I want to tell you three stories from my life. That&#8217;s it. No big deal. Just three stories.</p>
<p>The first story is about connecting the dots.</p>
<p>I dropped out of Reed College after the first 6 months, but then stayed around as a drop-in for another 18 months or so before I really quit. So why did I drop out?</p>
<p>It started before I was born. My biological mother was a young, unwed college graduate student, and she decided to put me up for adoption. She felt very strongly that I should be adopted by college graduates, so everything was all set for me to be adopted at birth by a lawyer and his wife. Except that when I popped out they decided at the last minute that they really wanted a girl. So my parents, who were on a waiting list, got a call in the middle of the night asking: &#8220;We have an unexpected baby boy; do you want him?&#8221; They said: &#8220;Of course.&#8221; My biological mother later found out that my mother had never graduated from college and that my father had never graduated from high school. She refused to sign the final adoption papers. She only relented a few months later when my parents promised that I would someday go to college.</p>
<p>And 17 years later I did go to college. But I naively chose a college that was almost as expensive as Stanford, and all of my working-class parents&#8217; savings were being spent on my college tuition. After six months, I couldn&#8217;t see the value in it. I had no idea what I wanted to do with my life and no idea how college was going to help me figure it out. And here I was spending all of the money my parents had saved their entire life. So I decided to drop out and trust that it would all work out OK. It was pretty scary at the time, but looking back it was one of the best decisions I ever made. The minute I dropped out I could stop taking the required classes that didn&#8217;t interest me, and begin dropping in on the ones that looked interesting.</p>
<p>It wasn&#8217;t all romantic. I didn&#8217;t have a dorm room, so I slept on the floor in friends&#8217; rooms, I returned coke bottles for the 5¢ deposits to buy food with, and I would walk the 7 miles across town every Sunday night to get one good meal a week at the Hare Krishna temple. I loved it. And much of what I stumbled into by following my curiosity and intuition turned out to be priceless later on. Let me give you one example:</p>
<p>Reed College at that time offered perhaps the best calligraphy instruction in the country. Throughout the campus every poster, every label on every drawer, was beautifully hand calligraphed. Because I had dropped out and didn&#8217;t have to take the normal classes, I decided to take a calligraphy class to learn how to do this. I learned about serif and san serif typefaces, about varying the amount of space between different letter combinations, about what makes great typography great. It was beautiful, historical, artistically subtle in a way that science can&#8217;t capture, and I found it fascinating.</p>
<p>None of this had even a hope of any practical application in my life. But ten years later, when we were designing the first Macintosh computer, it all came back to me. And we designed it all into the Mac. It was the first computer with beautiful typography. If I had never dropped in on that single course in college, the Mac would have never had multiple typefaces or proportionally spaced fonts. And since Windows just copied the Mac, its likely that no personal computer would have them. If I had never dropped out, I would have never dropped in on this calligraphy class, and personal computers might not have the wonderful typography that they do. Of course it was impossible to connect the dots looking forward when I was in college. But it was very, very clear looking backwards ten years later.</p>
<p>Again, you can&#8217;t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something — your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.</p>
<p>My second story is about love and loss.</p>
<p>I was lucky — I found what I loved to do early in life. Woz and I started Apple in my parents garage when I was 20. We worked hard, and in 10 years Apple had grown from just the two of us in a garage into a $2 billion company with over 4000 employees. We had just released our finest creation — the Macintosh — a year earlier, and I had just turned 30. And then I got fired. How can you get fired from a company you started? Well, as Apple grew we hired someone who I thought was very talented to run the company with me, and for the first year or so things went well. But then our visions of the future began to diverge and eventually we had a falling out. When we did, our Board of Directors sided with him. So at 30 I was out. And very publicly out. What had been the focus of my entire adult life was gone, and it was devastating.</p>
<p>I really didn&#8217;t know what to do for a few months. I felt that I had let the previous generation of entrepreneurs down - that I had dropped the baton as it was being passed to me. I met with David Packard and Bob Noyce and tried to apologize for screwing up so badly. I was a very public failure, and I even thought about running away from the valley. But something slowly began to dawn on me — I still loved what I did. The turn of events at Apple had not changed that one bit. I had been rejected, but I was still in love. And so I decided to start over.</p>
<p>I didn&#8217;t see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life.</p>
<p>During the next five years, I started a company named NeXT, another company named Pixar, and fell in love with an amazing woman who would become my wife. Pixar went on to create the worlds first computer animated feature film, Toy Story, and is now the most successful animation studio in the world. In a remarkable turn of events, Apple bought NeXT, I returned to Apple, and the technology we developed at NeXT is at the heart of Apple&#8217;s current renaissance. And Laurene and I have a wonderful family together.</p>
<p>I&#8217;m pretty sure none of this would have happened if I hadn&#8217;t been fired from Apple. It was awful tasting medicine, but I guess the patient needed it. Sometimes life hits you in the head with a brick. Don&#8217;t lose faith. I&#8217;m convinced that the only thing that kept me going was that I loved what I did. You&#8217;ve got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven&#8217;t found it yet, keep looking. Don&#8217;t settle. As with all matters of the heart, you&#8217;ll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don&#8217;t settle.</p>
<p>My third story is about death.</p>
<p>When I was 17, I read a quote that went something like: &#8220;If you live each day as if it was your last, someday you&#8217;ll most certainly be right.&#8221; It made an impression on me, and since then, for the past 33 years, I have looked in the mirror every morning and asked myself: &#8220;If today were the last day of my life, would I want to do what I am about to do today?&#8221; And whenever the answer has been &#8220;No&#8221; for too many days in a row, I know I need to change something.</p>
<p>Remembering that I&#8217;ll be dead soon is the most important tool I&#8217;ve ever encountered to help me make the big choices in life. Because almost everything — all external expectations, all pride, all fear of embarrassment or failure - these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.</p>
<p>About a year ago I was diagnosed with cancer. I had a scan at 7:30 in the morning, and it clearly showed a tumor on my pancreas. I didn&#8217;t even know what a pancreas was. The doctors told me this was almost certainly a type of cancer that is incurable, and that I should expect to live no longer than three to six months. My doctor advised me to go home and get my affairs in order, which is doctor&#8217;s code for prepare to die. It means to try to tell your kids everything you thought you&#8217;d have the next 10 years to tell them in just a few months. It means to make sure everything is buttoned up so that it will be as easy as possible for your family. It means to say your goodbyes.</p>
<p>I lived with that diagnosis all day. Later that evening I had a biopsy, where they stuck an endoscope down my throat, through my stomach and into my intestines, put a needle into my pancreas and got a few cells from the tumor. I was sedated, but my wife, who was there, told me that when they viewed the cells under a microscope the doctors started crying because it turned out to be a very rare form of pancreatic cancer that is curable with surgery. I had the surgery and I&#8217;m fine now.</p>
<p>This was the closest I&#8217;ve been to facing death, and I hope its the closest I get for a few more decades. Having lived through it, I can now say this to you with a bit more certainty than when death was a useful but purely intellectual concept:</p>
<p>No one wants to die. Even people who want to go to heaven don&#8217;t want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because Death is very likely the single best invention of Life. It is Life&#8217;s change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.</p>
<p>Your time is limited, so don&#8217;t waste it living someone else&#8217;s life. Don&#8217;t be trapped by dogma — which is living with the results of other people&#8217;s thinking. Don&#8217;t let the noise of others&#8217; opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.</p>
<p>When I was young, there was an amazing publication called The Whole Earth Catalog, which was one of the bibles of my generation. It was created by a fellow named Stewart Brand not far from here in Menlo Park, and he brought it to life with his poetic touch. This was in the late 1960&#8217;s, before personal computers and desktop publishing, so it was all made with typewriters, scissors, and polaroid cameras. It was sort of like Google in paperback form, 35 years before Google came along: it was idealistic, and overflowing with neat tools and great notions.</p>
<p>Stewart and his team put out several issues of The Whole Earth Catalog, and then when it had run its course, they put out a final issue. It was the mid-1970s, and I was your age. On the back cover of their final issue was a photograph of an early morning country road, the kind you might find yourself hitchhiking on if you were so adventurous. Beneath it were the words: &#8220;Stay Hungry. Stay Foolish.&#8221; It was their farewell message as they signed off. Stay Hungry. Stay Foolish. And I have always wished that for myself. And now, as you graduate to begin anew, I wish that for you.</p>
<p>Stay Hungry. Stay Foolish.</p>
<p>Thank you all very much.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpfour.com/blog/2007/09/23/inspiration/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
