<?xml version="1.0" encoding="ISO-8859-1"?><rss version="2.0"><channel><title>I learned something new today</title><description>Pritlog</description><link>http://hardkap.net/blog/index.</link><item><link>http://hardkap.net/blog/index.php/viewEntry/00055/PHP-script-to-handle-incoming-mails-using-pipes</link><title>PHP script to handle incoming mails using pipes</title><category>programming,pritlog,web</category><description>I recently came across this blogging service called &quot;&lt;a target=&quot;_blank&quot; title=&quot;Posterous&quot; href=&quot;http://posterous.com/&quot;&gt;Posterous&lt;/a&gt;&quot;. The feature that caught my attention was this: You can send mails to a particular email address and it would get automatically posted onto the blog as a post. I had heard about something similar in Wordpress couple of years ago. &lt;br&gt;&lt;br&gt;I started doing my research on how this could be done. In this post, I try to document the steps that were involved and any challenges I faced doing this.&lt;br&gt;&lt;br&gt;&lt;h4 style=&quot;font-weight: bold;&quot;&gt;What can this be used for?&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Such a script could handle the auto subscribe or unsubscribe to or from a mailing list&lt;/li&gt;&lt;li&gt;To write and manage a full mailing list application&lt;/li&gt;&lt;li&gt;To send commands to your site or scripts using emails&lt;/li&gt;&lt;li&gt;To post on a blog as I did&lt;/li&gt;&lt;li&gt;...... (your imagination is the limit)&lt;/li&gt;&lt;/ul&gt;&lt;h4 style=&quot;font-weight: bold;&quot;&gt;Step 1:&lt;/h4&gt;Add an email forwarder in your cPanel. Under the email section, you will find &quot;forwarders&quot;. Click on this and you will be able to add email forwarders.&amp;nbsp; When you add a forwarder, there will be an option to &quot;pipe to a
program&quot;. Choose this and add the full path to your php script that
will be handling the mails. This program should have permissions of 755
to be executable. I wasted some significant time because I forgot this.
&lt;br&gt;&lt;br&gt;&lt;img src=&quot;http://hardkap.net/blog/plugins/pictures/814755233578059.jpg&quot; width=&quot;508&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;img src=&quot;http://hardkap.net/blog/plugins/pictures/873761107664674.jpg&quot; width=&quot;542&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;img src=&quot;http://hardkap.net/blog/plugins/pictures/521327763847314.jpg&quot; width=&quot;542&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;br style=&quot;font-weight: bold;&quot;&gt;&lt;h4&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Step 2:&lt;/span&gt;&lt;/h4&gt;Now, you can start writing your program to handle the mails. It will look like this: (this script is taken from &lt;a target=&quot;_blank&quot; title=&quot;Evolt article&quot; href=&quot;http://www.evolt.org/article/Incoming_Mail_and_PHP/18/27914/index.html&quot;&gt;this post&lt;/a&gt;.)&lt;br&gt;&lt;br&gt;&lt;div class=&quot;code&quot;&gt;
#!/usr/bin/php -q&lt;br&gt;&amp;lt;?php&lt;br&gt;&lt;br&gt;ob_start();&lt;br&gt;&lt;br&gt;// read from stdin&lt;br&gt;$fd = fopen(&quot;php://stdin&quot;, &quot;r&quot;);&lt;br&gt;$email = &quot;&quot;;&lt;br&gt;while (!feof($fd)) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $email .= fread($fd, 1024);&lt;br&gt;}&lt;br&gt;fclose($fd);&lt;br&gt;// handle email&lt;br&gt;$lines = explode(&quot;n&quot;, $email);&lt;br&gt;&lt;br&gt;// empty vars&lt;br&gt;$from = &quot;&quot;;&lt;br&gt;$subject = &quot;&quot;;&lt;br&gt;$headers = &quot;&quot;;&lt;br&gt;$message = &quot;&quot;;&lt;br&gt;$splittingheaders = true;&lt;br&gt;&lt;br&gt;for ($i=0; $i &amp;lt; count($lines); $i++) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($splittingheaders) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // this is a header&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $headers .= $lines[$i].&quot;n&quot;;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // look out for special headers&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (preg_match(&quot;/^Subject: (.*)/&quot;, $lines[$i], $matches)) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $subject = $matches[1];&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (preg_match(&quot;/^From: (.*)/&quot;, $lines[$i], $matches)) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $from = $matches[1];&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (preg_match(&quot;/^To: (.*)/&quot;, $lines[$i], $matches)) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $to = $matches[1];&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // not a header, but message&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $message .= $lines[$i].&quot;n&quot;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (trim($lines[$i])==&quot;&quot;) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // empty line, header section has ended&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $splittingheaders = false;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;}&lt;br&gt;ob_end_clean();&lt;br&gt;?&amp;gt;&lt;/div&gt;When you have completed Step 1 and Step 2, the script will run when the mail arrives and reads and parses the mail. &lt;br&gt;&lt;br&gt;You can now use the variables, $to, $headers, $subject and $message and process as you require. Maybe use php mail to send them back an email or store it on a database. For the purposes of &lt;a target=&quot;_blank&quot; title=&quot;Pritlog hosted&quot; href=&quot;http://pritlog.com&quot;&gt;Pritlog hosted site&lt;/a&gt;, I do some validations and store this in the database. &lt;br&gt;&lt;br&gt;&lt;h4&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Step 3: (Only required if you need better message parsing)&lt;/span&gt;&lt;/h4&gt;One challenge I had was that the above script was not parsing the message well, especially when the message had multi-parts (text, html etc). I found this php class called &quot;&lt;a target=&quot;_blank&quot; title=&quot;Message parser&quot; href=&quot;http://www.phpclasses.org/browse/package/3169.html&quot;&gt;Mime email message parser&lt;/a&gt;&quot;. &lt;br&gt;&lt;br&gt;What I did is to write the full message (not parsed one) from the above step into a file and let the mime message parser class do the correct parsing. During my tests from several different email id's, this class parsed the mail correctly. &lt;br&gt;&lt;br&gt;Here is the code for this. &lt;br&gt;&lt;br&gt;&lt;div class=&quot;code&quot;&gt;
$file&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;= 'tempmail.txt';&lt;br&gt;$current = $email;&lt;br&gt;file_put_contents($file, $current);&lt;br&gt;require_once('mimeparser/rfc822_addresses.php');&lt;br&gt;require_once('mimeparser/mime_parser.php');&lt;br&gt;$message_file=((IsSet($_SERVER['argv']) &amp;amp;&amp;amp; count($_SERVER['argv'])&amp;gt;1) ? &lt;br&gt;&lt;br&gt;$_SERVER['argv'][1] : $file);&lt;br&gt;&amp;nbsp; $mime=new mime_parser_class;&lt;br&gt;&amp;nbsp; $mime-&amp;gt;mbox = 1;&lt;br&gt;&amp;nbsp; $mime-&amp;gt;decode_bodies = 1;&lt;br&gt;&amp;nbsp; $mime-&amp;gt;ignore_syntax_errors = 1;&lt;br&gt;&amp;nbsp; $parameters=array(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'File'=&amp;gt;$message_file,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'SkipBody'=&amp;gt;0,&lt;br&gt;&amp;nbsp; );&lt;br&gt;&amp;nbsp; if(!$mime-&amp;gt;Decode($parameters, $decoded))&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo 'MIME message decoding error: '.$mime-&amp;gt;error.' at position &lt;br&gt;&lt;br&gt;'.$mime-&amp;gt;error_position.&quot;rn&quot;;&lt;br&gt;&amp;nbsp; else&lt;br&gt;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for($message = 0; $message &amp;lt; count($decoded); $message++)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if($mime-&amp;gt;Analyze($decoded[$message], $results)) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $message = $results[&quot;Data&quot;];&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo 'MIME message analyse error: '.$mime-&amp;gt;error.&quot;rn&quot;;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp; }&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;h4&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Things to remember:&lt;/span&gt;&lt;/h4&gt;&lt;ol&gt;&lt;li&gt;The #!/usr/bin/php -q at the beginning of your script is very important. The &quot;-q&quot; supresses output. My initial attempts were failing and took a long time for me to figure this one out. If it had any sort of outputs or warnings, then the mail would bounce back. When I did this, it stopped bouncing back.&lt;/li&gt;&lt;li&gt;The CHMOD of the script must be 755 (executable). Again, the mails kept bouncing back when the permissions on the script where not 755. &lt;/li&gt;&lt;/ol&gt;I have only written steps applicable for websites hosted on cPanel, with email forwarding to pipe enabled and PHP programs. Hope this helps some of you. &lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The outcome of this experiment is that now Pritlog.com users can send mails to post on their blogs. Hurray!!&lt;/span&gt;&lt;br&gt;&lt;br&gt;Please feel free to post any comments, suggestions or questions.&lt;br&gt;&lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00054/Plugin-system-for-Pritlog</link><title>Plugin system for Pritlog</title><category>pritlog,web</category><description>A plugin system enables external users or members of the community to add functionality to the software without even touching a single line from the main software program.&lt;br&gt;&lt;br&gt;Pritlog needed a plugin system and that too a very efficient and lightweight one. I found the plugin system called &quot;Simple Hooks Plugin&quot; from Phpclass website. The link is &lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://phpclasses.betablue.net/browse/package/4497.html&quot;&gt;http://phpclasses.betablue.net/browse/package/4497.html&lt;/a&gt;.&lt;br&gt;&lt;br&gt;I will mention some details of how it is implemented.&lt;br&gt;&lt;br&gt;Firstly, the main program needs to initialize the plugins. It can be done like this:&lt;br&gt;&lt;br&gt;&lt;div class=&quot;code&quot;&gt;//include Simple Hooks Plugin Class &lt;br&gt;$SHP = new SHP();

&lt;br&gt;&lt;br&gt;//set hook to which plugin developers can assign functions
$SHP-&amp;gt;developer_set_hook('hook-test');
&lt;/div&gt;&lt;br&gt;&lt;br&gt;
Second, the main program needs to define what is called hooks. These are basically points in the main program where the developer wants external plugins to attach and execute. This code can look like this:&lt;br&gt;
&lt;div class=&quot;code&quot;&gt;&amp;lt;html&amp;gt;
&lt;br&gt;&amp;lt;head&amp;gt;&lt;br&gt;&amp;lt;title&amp;gt;Testing the plugins&amp;lt;/title&amp;gt;&lt;br&gt;&amp;lt;/head&amp;gt;
&lt;br&gt;&amp;lt;body&amp;gt;
&lt;br&gt;&amp;lt;?php

&lt;br&gt;//Initialize the plugin
&lt;br&gt;include &quot;SHP.class.php&quot;;
&lt;br&gt;$SHP = new SHP();
&lt;br&gt;$SHP-&amp;gt;developer_set_hook('hook-test');

&lt;br&gt;echo &quot;&amp;lt;h1&amp;gt;Simple Hooks Plugin&amp;lt;/h1&amp;gt;&quot;;

&lt;br&gt;$SHP-&amp;gt;execute_hooks('hook-test');

&lt;br&gt;?&amp;gt;
&lt;br&gt;&amp;lt;/body&amp;gt;&lt;br&gt;&amp;lt;/html&amp;gt;
&lt;/div&gt;&lt;br&gt;In the above piece of code, the developer has provided a hook called hook-test where external plugins can attach and execute. Now let us look at a simple plugin.&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;code&quot;&gt;
//set plugin id as file name of plugin
&lt;br&gt;$plugin_id = basename(__FILE__);
&lt;br&gt;&lt;br&gt;//some plugin data&lt;br&gt;$data['name'] = &quot;Name of the plugin&quot;;
&lt;br&gt;$data['author'] = &quot;Authors Name&quot;;
&lt;br&gt;$data['desc']&amp;nbsp;&amp;nbsp; = &quot;Brief description of the plugin&quot;;
&lt;br&gt;$data['url'] = &quot;Plugin/Author website&quot;;

&lt;br&gt;&lt;br&gt;//register the plugin
&lt;br&gt;register_plugin($plugin_id, $data);

&lt;br&gt;&lt;br&gt;//plugin function
&lt;br&gt;function test_function() {
&lt;br&gt;echo 'echoed from plugin';
&lt;br&gt;}

&lt;br&gt;&lt;br&gt;//add hook, where to execute a function
&lt;br&gt;add_hook($plugin_id, 'hook-test','test_function');&amp;nbsp; &lt;br&gt;echo &quot;Plugin 1 LOADED!&quot;;&amp;nbsp;&amp;nbsp; //code to execute when loading plugin
&lt;/div&gt;&lt;br&gt;
When the main program runs, this plugin is picked up and the final output from the program would be:&lt;br&gt;&lt;br&gt;Plugin 1 LOADED!&lt;br&gt;&amp;lt;h1&amp;gt;Simple Hooks Plugin&amp;lt;/h1&amp;gt;&lt;br&gt;echoed from plugin&lt;br&gt;&lt;br&gt;See how the code from the plugin got executed in the main program even without touching a single line of code from the main program.&lt;br&gt;&lt;br&gt;In Pritlog, I modified the plugin system so that the user can enable or disable a plugin at will.&lt;br&gt;&lt;br&gt;This was a very interesting and exciting experiment for me.&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00053/Testimony--God-saved-me-from-destruction</link><title>Testimony: God saved me from destruction</title><category>testimony</category><description>It was my birthday and I was driving on the highway 101 from Woodland Hills to Westlake Village. I must have been going at pretty good speed and all of a sudden, when I was nearing Agoura Hills, a red car from two lanes away started changing lanes. Within no time, it was almost half into my lane. It was in an instant and I just steered a little to the right and missed a major accident. By God's grace, there was no car in the lane on my right. I was in shock for sometime and I think the folks in the red car would have been in the same situation as I could see them going extremely slow after this incident. &lt;br&gt;&lt;br&gt;I thank my God for protecting me continuously even though I have not been very faithful to Him many times. &lt;br&gt;&lt;br&gt;Few weeks ago, one of amy friends was sharing this - &quot;since you actually witnessed an incident
where God protected you supernaturally, you think - wow God is
protecting you .. What about the millions of other instances when God
is protecting and caring for you and you never see it because He has
prevented an accident or a harmful condition much before it ever came near you.&quot; This really made me think and hope will make you think too. &lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Psalms 103:&lt;/span&gt;&lt;br&gt;&lt;br&gt; &lt;sup id=&quot;en-NKJV-15551&quot; class=&quot;versenum&quot; value=&quot;1&quot;&gt;1&lt;/sup&gt; Bless the LORD, O my soul;&lt;br&gt;         And all that is within me, &lt;i&gt;bless&lt;/i&gt; His holy name!&lt;br&gt; &lt;sup id=&quot;en-NKJV-15552&quot; class=&quot;versenum&quot; value=&quot;2&quot;&gt;2&lt;/sup&gt; Bless the LORD, O my soul,&lt;br&gt;         And forget not all His benefits:&lt;br&gt; &lt;sup id=&quot;en-NKJV-15553&quot; class=&quot;versenum&quot; value=&quot;3&quot;&gt;3&lt;/sup&gt; Who forgives all your iniquities,&lt;br&gt;         Who heals all your diseases,&lt;br&gt; &lt;sup id=&quot;en-NKJV-15554&quot; class=&quot;versenum&quot; value=&quot;4&quot;&gt;4&lt;/sup&gt; Who &lt;span style=&quot;text-decoration: underline;&quot;&gt;redeems your life from destruction&lt;/span&gt;,&lt;br&gt;         Who crowns you with lovingkindness and tender mercies,&lt;br&gt; &lt;sup id=&quot;en-NKJV-15555&quot; class=&quot;versenum&quot; value=&quot;5&quot;&gt;5&lt;/sup&gt; Who satisfies your mouth with good &lt;i&gt;things,&lt;/i&gt;&lt;br&gt;         &lt;i&gt;So that&lt;/i&gt; your youth is renewed like the eagle’s.  &lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00052/Create-subdomains-in-PHP</link><title>Create subdomains in PHP</title><category>web</category><description>When I started receiving more and more requests for installing Pritlog on my server for different folks, I wanted to think of a better solution than just installing a separate Pritlog copy to each individual and put them in separate sub directories. This can cause any modification or updations to all these different installations to be a very time consuming task. &amp;nbsp;&lt;br&gt;&lt;br&gt;This is when I started thinking about the possibility of modifying Pritlog in such a way that a single installation could handle multiple blogs and these blogs can be in separate subdomains - similar to how it works in Blogspot and few other sites. &lt;br&gt;&lt;br&gt;First task was to create sub domains dynamically using PHP. Usually, sub domains can be created from the control panel provided by your hosting provider. But, this is a manual task. I did some searching through the net and came across some articles that talked about using a XML API provided by cPanel (hosting control panel) that could be used. My delicious link below has the bookmarks I made during my research.&lt;br&gt;&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://delicious.com/prithish/subdomain&quot;&gt;http://delicious.com/prithish/subdomain&lt;/a&gt;&lt;br&gt;&lt;br&gt;But, none of the API solutions worked for me. I was trying this on my hosting account with Hostmonster. Finally, the below solution worked for me. &lt;br&gt;The original discussion link:&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://www.webmasterworld.com/forum88/8746.htm&quot;&gt;http://www.webmasterworld.com/forum88/8746.htm&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;h4&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The steps that actually helped me.&lt;/span&gt;&lt;br&gt;&lt;/h4&gt;&lt;font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Step 1: &lt;/span&gt;First you need to set
your main domain to act as a catch-all subdomain. its like putting
ServerAlias * so that each subdomain which is requested &lt;br&gt;to the main domain reaches the same place. I mean  if your main domain root is &lt;/font&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;2&quot;&gt;/home/admin/abc.com/htdocs/ &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;2&quot;&gt;then your catch-all setup shall send all sub-domain requests to that same directory &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;2&quot;&gt;/home/admin/abc.com/htdocs/ &lt;br&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;Initially, I could not figure out how to do it in Hostmonster. Finally, I found the solution somewhere that said, we could add a subdomain called '*' and make it direct to the root of the domain. This way, my domain became a catch all domain.&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Step 2: &lt;/span&gt;&lt;/font&gt;&lt;font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;2&quot;&gt;You'd add this code to very top of your index page right after &quot;&quot;&lt;/font&gt;&lt;/p&gt;&lt;div class=&quot;code&quot;&gt;
$domain = $_SERVER['HTTP_HOST']; &lt;br&gt;
$domain_parts = explode('.',$domain);
&lt;br&gt;if (count($domain_parts) == 3 &amp;amp;&amp;amp; $domain_parts[0]!= &quot;www&quot;) { &lt;br&gt;&amp;nbsp;&amp;nbsp; // make sure a subdomain is called 
&lt;br&gt;&amp;nbsp;&amp;nbsp; $user = $domain_parts[0]; 
&lt;br&gt;&amp;nbsp;&amp;nbsp; $loc = &quot;http://domain.tld/whateverpage.ext?varname=$user&quot;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp; @header(&quot;Location:$loc&quot;); 
&lt;br&gt;} 
&lt;/div&gt;
&lt;br&gt;What this step is basically saying is when the domain is a catch all domain, all requests to any subdomains will come to the index files of the root domain. You can add this code to parse the data in the requested url and figure out what subdomain was requested and use &quot;header&quot; function from within your index script to handle the redirection. &lt;br&gt;&lt;br&gt;I am now using this to provide hosted Pritlog. Here are some links to check this out.&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://mathew.pritlog.com/&quot;&gt;http://mathew.pritlog.com/&lt;/a&gt;&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://tania.pritlog.com/&quot;&gt;http://tania.pritlog.com/&lt;/a&gt;&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://blakley.pritlog.com/&quot;&gt;http://blakley.pritlog.com/&lt;/a&gt;&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://blakley.pritlog.com/&quot;&gt;&lt;font color=&quot;#000000&quot; face=&quot;verdana&quot; size=&quot;2&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;br&gt;If anything on this post is not clear, please feel free to post a comment requesting clarification.&lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00051/Testimony--Peace-in-the-flight</link><title>Testimony: Peace in the flight</title><category>testimony</category><description>Few weeks ago, we had to travel to a Oklahoma city to meet with our pastor from India. He was visiting here for a convention. &lt;br&gt;&lt;br&gt;Our son is a very active kid. He loves to run around and doesnt like to be constrained in a place. My wife had thought and planned very well to make sure that my son would be calm and quiet in the flight. She purchased all kinds of fun things and toys and drawing stuff so that he could be kept in one place. &lt;br&gt;&lt;br&gt;We surrendered every detail of the trip to Jesus and started the journey. After all the procedures, we finally boarded the flight. After the flight took off, I looked at my son who was sitting near my wife in the adjacent set of seats. He was sleeping away. Just few minutes ago when we boarded the flight, he was very active. I was surprised. It was as if he was drugged. :). He slept throughout the journey. We could not ask for more from our Lord. The times he did not sleep, he would be just focusing on scribbling something on the drawing board. We were so excited and grateful for the way God takes care of us in spite of our shortcomings. &lt;br&gt;&lt;br&gt;Even our return journey was blessed by God. My son was sleeping most of the time and it was very peaceful. It was like a dream. &lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Jeremiah 32:27&lt;/span&gt;&lt;br&gt;“Behold, I am the LORD, the God of all flesh. Is there anything too hard for Me?&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00050/Template-engine-for-Pritlog</link><title>Template engine for Pritlog</title><category>web</category><description>In developing the latest release of Pritlog, one major ingredient I wanted to add was a template engine. I searched far and wide on the web and came up with a big list of probably solutions. Keep in mind that I was more interested in very simple and light weight solutions and not in any full fledged template engines. This requirement is because I want Pritlog to be a lightweight blogging solution. &lt;br&gt;&lt;br&gt;If you want to see the complete list of templating solutions I bookmarked, here they are:&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://delicious.com/prithish/templateengine&quot;&gt;http://delicious.com/prithish/templateengine&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;h4&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The below two fascinated me:&lt;/span&gt;&lt;/h4&gt;1 - &lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://thephppro.com/articles/pte.php&quot;&gt;Using PHP as your template engine: &lt;/a&gt;The author explains how the &lt;span style=&quot;font-weight: bold;&quot;&gt;extract&lt;/span&gt; command in PHP can be used to create an easy solution for templating with pure PHP.&lt;br&gt;&lt;br&gt;2 - &lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://www.webmasterworld.com/php/3444822.htm&quot;&gt;The one line template engine:&lt;/a&gt; The author gives the solution mentioned below. I ended up using this for Pritlog and was pretty satisfied with this approach. Pritlog is still under 350 KB uncompressed with templating and plugin functionality. &lt;br&gt;&lt;br&gt;I apologize if the code does not look very clean. I will see if I can get a good code highlighter gadget to use on my Pritlog.&amp;nbsp; The engine itself:&amp;nbsp; &lt;textarea name=&quot;code&quot; class=&quot;php&quot;&gt;print preg_replace(&quot;/{([^{]{1,100}?)}/e&quot;,&quot;$$1&quot;,file_get_contents(&quot;template.tpl&quot;));&lt;/textarea&gt;&lt;br&gt;Format of template.tpl file: 
&lt;textarea name=&quot;code&quot; class=&quot;php&quot;&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;title&amp;gt;{title}&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;h1&amp;gt;{header}&amp;lt;/h1&amp;gt;
{text}
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

Setting variables: 
$title=&quot;Example page&quot;; 
$header=&quot;My Examples&quot;; 
$text=&quot;See the placeholders replaced?&quot;;&lt;/textarea&gt;
&lt;br&gt;If you're not comfortable with pulling variables out of the global scope, define them as 
&lt;textarea name=&quot;code&quot; class=&quot;php&quot;&gt;$values['title']=&quot;..&quot;; etc., and use: 
print preg_replace(&quot;/{([^{]{1,100}?)}/e&quot;,&quot;$values[$1]&quot;,file_get_contents(&quot;template.tpl&quot;));
&lt;/textarea&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00049/Website-hosting-with-Godaddy</link><title>Website hosting with Godaddy</title><category>web</category><description>&lt;span style=&quot;font-weight: bold;&quot;&gt;First fact&lt;/span&gt; - I don't get any money or sponsorship for this blog and hence this is an honest account from experience.&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Its amazing&lt;/span&gt; how when looking for hosting deals, you come across lots of websites claiming that they give web hosting reviews. But looking through many such sites, I found that they all talked about the same companies over and over again and usually Godaddy and Yahoo hosting rated very poor on these review sites. &lt;br&gt;&lt;br&gt;Also, &lt;span style=&quot;font-weight: bold;&quot;&gt;its shocking&lt;/span&gt; to know that many major hosting companies are infact part of the same group. We might think they are competitors, but they are just a big group working with each other. This is one reason we can see good reviews about all these sites always together in the same place. I am not going to mention any names. Please do your research.&lt;br&gt;&lt;br&gt;&lt;h4&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;3IX Hosting:&lt;/span&gt;&lt;/h4&gt;I was with a hosting company called &lt;span style=&quot;font-weight: bold;&quot;&gt;3ix&lt;/span&gt; for a year before switching to Godaddy. I must say that &lt;span style=&quot;font-weight: bold;&quot;&gt;3iX&lt;/span&gt; did an excellent job for the price. I paid around $33 for hosting for a year for 3 websites and the sites have been down for only a couple of days in a whole year. Because my requirements were low, I really did not get affected by this. All other times, it has been very stable and fast. I could get the live chat support anytime instantly. If someone is looking for extremely cheap hosting with excellent support, then 3ix would be a great choice. &lt;br&gt;&lt;br&gt;&lt;h4&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Godaddy:&lt;/span&gt;&lt;/h4&gt;I switched to Godaddy seeking more stability. I have been with them for over a year now and have been very happy. The sites have rarely went down and I could do all the things I needed using the hosting. The support has been great and friendly. &lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br&gt;&lt;br&gt;There are minor glitches like &lt;/span&gt;&lt;br&gt;- htaccess takes around 1 hour to get activated&lt;br&gt;- Its not cpanel and its their own control panel software&lt;br&gt;- There are no logging apps like awstats&lt;br&gt;- Very limited MySQL Databases&lt;br&gt;- Setting new things like new ftp user, new database, new domains can take couple of hours&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br&gt;Positives:&lt;/span&gt;&lt;br&gt;- Friendly and good support&lt;br&gt;- Fast - I have never had speed or bandwidth problems&lt;br&gt;- Stable - The server has been very stable and my sites have hardly gone down&lt;br&gt;&lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00048/Pritdeals---Faster-and-Smarter</link><title>Pritdeals - Faster and Smarter</title><category>web</category><description>PritDeals website has been around for atleast over a year now. It used to be a sub domain of hardkap. Last week, I moved this to its own domain at &lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://pritdeals.com&quot;&gt;http://pritdeals.com&lt;/a&gt;. &lt;br&gt;&lt;br&gt;&lt;h4&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;This is how PritDeals worked till before last week:&lt;/span&gt;&lt;/h4&gt;- Every time someone visits the page or refreshes the page, it would go and read and parse the feeds from these other deal sites. This backend operation happens at the server in a PHP script and then it sends it to the client browser. The searches are done completely using the client browser. Hence it is faster to perform searches. &lt;br&gt;&lt;br&gt;The disadvantage of this approach was that the initial time to load was not pleasant. Hence I started working on a better solution.&lt;br&gt;&lt;br&gt;&lt;h4&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;This is how PritDeals works now:&lt;/span&gt;&lt;/h4&gt;- A cron job on the server runs a PHP script to get the feeds from these deal sites and upload it to a database. &lt;br&gt;- Every time someone visits or refreshes the page, it just goes and reads from the database and sends it to the client browser. &lt;br&gt;&lt;br&gt;This approach has made significant improvements in the initial load times.&lt;br&gt;&lt;br&gt;While I was at it, I also changed the way the search was being done. Now it handles multiple words very well. The order of the words does not matter when searching with multiple keywords. &lt;br&gt;&lt;br&gt;&lt;h4&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;What is planned for PritDeals?&lt;/span&gt;&lt;/h4&gt;- I want to add a deal watch feature where anybody can give a list of keywords, an expected price and their email id to get automatic notification when there is a deal that matches their criteria and price. &lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00047/Login-to-cPanel-without-the-port</link><title>Login to cPanel without the port</title><category>web</category><description>I don't know if this rule can be generalized as it depends on the hosting company and how they are setup.&lt;br&gt;&lt;br&gt;I have been using Hostmonster from last month for hosting websites. One major drawback for me was that it was not possible to connect to the control panel (cpanel) from everywhere. In some locations, the special ports are blocked and cpanel uses a special port 2083. Hence I could not connect to the Hostmonster control panel.&lt;br&gt;&lt;br&gt;I was googling and searching for a solution and somebody on the hostmonster forum had an answer to this. &lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Login using this link&lt;/span&gt; - &lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://login.hostmonster.com&quot;&gt;http://login.hostmonster.com&lt;/a&gt; and your cpanel id and password. This worked for me in hostmonster and I also checked on a friends account at bluehost and it worked there too. Hope this helps someone.&lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00046/The-Surrendered-Life</link><title>The Surrendered Life</title><category>christian</category><description>Reblogging from David Wilkerson's Blog. &lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;Surrendered Life&quot; href=&quot;http://davidwilkersontoday.blogspot.com/2009/04/surrendered-life.html&quot;&gt;http://davidwilkersontoday.blogspot.com/2009/04/surrendered-life.html&lt;/a&gt;&lt;br&gt;&lt;p style=&quot;margin: 0in 0in 0pt; line-height: normal;&quot;&gt;&lt;span style=&quot;color: rgb(13, 13, 13);&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0in 0in 0pt; line-height: normal;&quot;&gt;&lt;span style=&quot;color: rgb(13, 13, 13);&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;“Surrender.” What does this word tell you? In literal terms, &lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;surrender&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
means “to give up something to another person.” It also means to
relinquish something granted to you. This could include your
possessions, power, goals, even your life. &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00047/Login-to-cPanel-without-the-port&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00045/The-Secret-of-God-s-Presence</link><title>The Secret of God’s Presence</title><category>christian</category><description>I was reading David Wilkerson's blog today and came across this article about &quot;the secret of God's presence&quot;. Below is the link to the article from his blog:&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://davidwilkersontoday.blogspot.com/2009/03/secret-of-gods-presence_16.html&quot;&gt;http://davidwilkersontoday.blogspot.com/2009/03/secret-of-gods-presence_16.html&lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00046/The-Surrendered-Life&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00044/Testimony--Anniversary-trip-to-Pismo-Beach</link><title>Testimony: Anniversary trip to Pismo Beach</title><category>testimony</category><description>Reading the bible, we find out that the Israelites kept memorial stones in the places where God acted on their behalf so that they could pass on the testimonies to their next generations. &lt;br&gt;&lt;br&gt;We used to record the testimonies of God acting for us. But lately we have not recorded any. This is one instance few months ago when we experienced a wonderful favor from God. &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00045/The-Secret-of-God-s-Presence&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00043/CSS-Sprites</link><title>CSS Sprites</title><category>web</category><description>When working on Pritlog 0.8, I wanted to make it perform better. Hence, using the &lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://developer.yahoo.com/yslow/&quot;&gt;Firefox addon Yslow&lt;/a&gt;, I did some analysis and found that there were around 28 HTTP requests being made on every page refresh of Pritlog. &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00044/Testimony--Anniversary-trip-to-Pismo-Beach&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00042/CSS-Frameworks</link><title>CSS Frameworks</title><category>web</category><description>This would be my first post on this blog after moving to Pritlog 0.8. This is the first version of Pritlog using Sqlite as backend instead of flat files. &lt;br&gt;&lt;br&gt;When working on Pritlog, it was my constant search to find a suitable css framework that included a decent CSS reset and a layout system. Resets are used so that the website looks the same across different web browsers. &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00043/CSS-Sprites&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00041/PritMartkit--Social-bookmarking-button</link><title>PritMartkit: Social bookmarking button</title><category>programming</category><description>I have been searching for a good bookmarking button to use for Pritlog. I found a couple of good ones, but all of them have external website dependancies and this was slowing down Pritlog. Hence, after doing some research, I wrote one. I am currently working on getting this to be easy to use on any site so that it can be released as a javascript file. I will be posting more when something is ready to be released. &lt;br&gt;&lt;br&gt;The different experiments I did on this front are on this webpage:&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;&quot; href=&quot;http://hardkap.net/pritmarkit&quot;&gt;http://hardkap.net/pritmarkit&lt;/a&gt;&lt;br&gt;&lt;br&gt;I am not releasing anything yet as I found several inconsistencies when working with different browsers. Hence, I cannot assure if this solution will work as is with different browsers/ css frameworks.&lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00040/Are-you-reading-the-small-fonts</link><title>Are you reading the small fonts?</title><category>tips</category><description>After several experiences in missing to read important stuff written in small fonts, I thought to write a little about the experiences. This might help some.&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Example 1:&lt;br&gt;&lt;/span&gt;If you&lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;go to several super foods, health foods website, they say &quot;as seen on CBS, Oprah&quot; etc. &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00041/PritMartkit--Social-bookmarking-button&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00039/Considering-Sqlite-for-Pritlog</link><title>Considering Sqlite for Pritlog</title><category>programming</category><description>After my experiments with flat files and php for Pritlog, when I came to find out that Sqlite would be much more performance effective compared to flat files, I am starting to think if I should move to Sqlite for Pritlog. &lt;br&gt;&lt;br&gt;As an initial test, I tried using a table with 5000 records. Did all common operations like read, update, search. These operations completed in an instant. Absolutely no performance issues. Users would not even realize that there are 5000 records being accessed. I am impressed.&lt;br&gt;&lt;br&gt;Sqlite databases are simple files created on the path you specify. Hence, I would think, we can move these around and get the same functionality. Mobility is one thing I would like Pritlog to always have. &lt;br&gt;&lt;br&gt;I have posted on the Pritlog forum to see the responses from about moving to Sqlite. &lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00038/Flat-file-databases-in-PHP</link><title>Flat file databases in PHP</title><category>computers</category><description>After releasing the beta version of Pritlog 0.412, I started doing performance tests on Pritlog using varying number of posts. When I reached over 500 posts, I started noticing performance issues and slow response times. Crossing 1000, it almost was not responding. &lt;br&gt;&lt;br&gt;This is when I started searching for a better solution for using flat files in PHP. I came across the following solutions of using flat file databases in PHP. These use SQL to retrieve rows from a flat file. Very interesting. But the performance did not improve any as these were still flat files. Anyway, these are interesting and can be very useful.&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;txtSql&quot; href=&quot;http://www.txtsql.com/&quot;&gt;http://www.txtsql.com/&lt;/a&gt; - (has an admin like phpmyadmin)&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;simpledb&quot; href=&quot;http://code.google.com/p/phpsimpledb/&quot;&gt;http://code.google.com/p/phpsimpledb/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;ffdb&quot; href=&quot;http://sourceforge.net/projects/ffdb-php/&quot;&gt;http://sourceforge.net/projects/ffdb-php/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;flatfile&quot; href=&quot;http://lukeplant.me.uk/resources/flatfile/&quot;&gt;http://lukeplant.me.uk/resources/flatfile/&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;Below link has some discussion about flat file db's.&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;discuss&quot; href=&quot;http://www.usenet-forums.com/php-language/393159-pure-php-flat-file-databases.html&quot;&gt;http://www.usenet-forums.com/php-language/393159-pure-php-flat-file-databases.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;In many places, I found that &lt;span style=&quot;font-weight: bold;&quot;&gt;Sqlite&lt;/span&gt; is recommended for speed and performance. It is much more superior than flat files and also, it is installed by default on most php installations. Hence no separate server install or software required.&lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00037/George-Foremans-grill</link><title>George Foreman's grill</title><category>cooking</category><description>My wife and I - love the taste of grilled food. As we dont have that kind of backyard space for a real grill, we tried to grill using the oven, but this never tasted that good. &lt;br&gt;&lt;br&gt;Once my friend suggested George foreman's grill. I have never heard that name before. We found a small version of this for about $25. This small version could grill 4 servings at once. This was enough for the two of us.&lt;br&gt;&lt;br&gt;This is an electric grill with a little tilt so that any extra oil flows off of the fish/meat. The grilling can be done completely indoors.&lt;br&gt;&lt;br&gt;We started with Salmon and it came out very well. Almost like the taste of a regular outdoor grill. It removes lot of oil/fat from any meat that we grill because of the tilted design. In the last few weeks of using it, we have grilled salmon, chicken. Yet to try steak. &lt;br&gt;&lt;br&gt;But for those of you who love the taste of grilled food and start off with a small one, this is ideal. &lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00036/Video-Editing-on-Linux</link><title>Video Editing on Linux</title><category>linux</category><description>Blender comes pretty close ( &lt;a title=&quot;Blender&quot; href=&quot;http://www.blender.org/&quot; target=&quot;_blank&quot;&gt;http://www.blender.org&lt;/a&gt; ). Recent builds include FFMPEG support that enables NLE Video/Audio.&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Features:&lt;/span&gt;&lt;br&gt;Import all formats that FFMPEG supports. &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00037/George-Foremans-grill&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00035/Mpingi--Beware-of-this-company</link><title>Mpingi: Beware of this company</title><category>tips</category><description>I wanted to write about my recent experiences with this highly dangerous company. I don't think they can operate with such fraud intentions within the US. But they still are. I need some tips on how to report such companies.&lt;br&gt;&lt;br&gt;Here are the events that happened:&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00036/Video-Editing-on-Linux&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00034/Stars-on-the-Earth</link><title>Stars on the Earth</title><category>family</category><description>Just thought of writing about the morals/thoughts I learned or realized after watching the hindi movie called &quot;Tare zameen par&quot; which means &quot;Stars on the Earth&quot; in english. The movie is about a boy who has difficulty in reading and writing, but has other significant skills with painting and creativity. &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00035/Mpingi--Beware-of-this-company&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00033/Presentation-skills</link><title>Presentation skills</title><category>tips</category><description>Another post based on one of the recent reading on the web. This is related to presentation skills. &lt;br&gt;&lt;br&gt;As always you are encouraged to read the full article at:&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;Presentation Skills&quot; href=&quot;http://wziwyo.com/?p=177&quot;&gt;http://wziwyo.com/?p=177&lt;/a&gt; &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00034/Stars-on-the-Earth&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00032/Google-insights---see-trends</link><title>Google insights - see trends</title><category>web</category><description>I saw this google product that can be very helpful for businesses and creating products. &lt;br&gt;&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;Google insights&quot; href=&quot;http://www.google.com/insights/search/#&quot;&gt;http://www.google.com/insights/search/#&lt;/a&gt;&lt;br&gt;&lt;br&gt;You can see what people are searching, what regions are searching for a particular search term. You can compare search volume patterns across specific regions, categories, and time frames. &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00033/Presentation-skills&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00031/Align-div-in-Internet-Explorer</link><title>Align div in Internet Explorer</title><category>web</category><description>The trick to center a div in IE.&lt;br&gt;&lt;ul&gt;&lt;li&gt;Body selector: text-align: center; &lt;/li&gt;&lt;li&gt;Div/Container: margin: 0 auto;&lt;/li&gt;&lt;li&gt;Div/Container: text-align: left; on the container to counter the center align for body&lt;/li&gt;&lt;/ul&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00030/How-I-search-for-deals</link><title>How I search for deals</title><category>tips</category><description>Just thought of noting down the ways I try to find a good deal (especially applicable for electronic products).&lt;br&gt;&lt;br&gt;Check the below websites:&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;deals.hardkap.com&quot; href=&quot;http://deals.hardkap.com/&quot;&gt;deals.hardkap.com&lt;/a&gt;: This is a page I created that will allow fast search of various deal sites. Best method to search rather than visit all the deal websites.&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;deals2buy.com&quot; href=&quot;http://deals2buy.com&quot;&gt;deals2buy.com&lt;/a&gt;: This is a popular deal site. If you want to get more details with pictures compared to the above search. &lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;edealinfo.com&quot; href=&quot;http://edealinfo.com&quot;&gt;edealinfo.com&lt;/a&gt;: Another popular deal site.&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;amazon.com&quot; href=&quot;http://amazon.com&quot;&gt;amazon.com&lt;/a&gt;: Sometimes, we might be able to find good deals here. &lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;ebay.com&quot; href=&quot;http://ebay.com&quot;&gt;ebay.com&lt;/a&gt;: Make sure you look for &quot;buy it now&quot; items. Also check for the feedback of the seller. &lt;/li&gt;&lt;/ul&gt;&lt;br&gt;Second set of sites you can search:&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;bestbuy.com&quot; href=&quot;http://bestbuy.com&quot;&gt;bestbuy.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;circuitcity.com&quot; href=&quot;http://circuitcity.com&quot;&gt;circuitcity.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;frys.com&quot; href=&quot;http://frys.com&quot;&gt;frys.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;target.com&quot; href=&quot;http://target.com&quot;&gt;target.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target=&quot;_blank&quot; title=&quot;walmart.com&quot; href=&quot;http://walmart.com&quot;&gt;walmart.com&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;Usually, when I am looking for an electronic item. I search all these sites in the order specified and go for the cheapest and best deal. Make sure you check the full amount (price+tax+shipping).&lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00029/Htaccess-Tricks</link><title>Htaccess Tricks</title><category>web</category><description>htaccess files are optional configuration files used in Apache web servers that can be used to control the directories they are placed in and also the sub directories.&lt;br&gt;&lt;br&gt;If your host allows .htaccess files, you may want to read the below articles and use the powerful techniques explained. &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00030/How-I-search-for-deals&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00028/Read-apache-logs-using-grep</link><title>Read apache logs using grep</title><category>web</category><description>Some tips from the below link to read your apache log files using the simple grep command.&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;Grep your log&quot; href=&quot;http://immike.net/blog/2007/07/12/grepping-your-web-logs/&quot;&gt;http://immike.net/blog/2007/07/12/grepping-your-web-logs/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Here are some quotes from the article: &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00029/Htaccess-Tricks&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00027/Bash-prompt-like-Dos-prompt</link><title>Bash prompt like Dos prompt</title><category>computers</category><description>I read this interesting and very simple tip on how to convert your linux bash prompt to look like a dos prompt.&lt;br&gt;&lt;br&gt;Here is the link to the original article.&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;Bash like Dos prompt&quot; href=&quot;http://www.linuxhaxor.net/2008/07/18/make-your-bash-prompt-look-like-dos-prompt/&quot;&gt;http://www.linuxhaxor.net/2008/07/18/make-your-bash-prompt-look-like-dos-prompt/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Quote from the article:&lt;br&gt;&lt;div class=&quot;quote&quot;&gt;&lt;p style=&quot;font-weight: bold;&quot;&gt;Add this line to your .bashrc: &lt;em&gt;PS1=’C:${PWD////}&gt;’&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This basically changes the format of your prompt, to look like a dos
prompt. &lt;br&gt;&lt;/p&gt;&lt;/div&gt;&lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00026/Think-simple</link><title>Think simple</title><category>general</category><description>I came across this good article recently. Please consider reading the whole article at the below link:&lt;br&gt;&lt;a target=&quot;_blank&quot; title=&quot;Think Simple Now&quot; href=&quot;http://thinksimplenow.com/clarity/find-clarity-in-one-day&quot;&gt;http://thinksimplenow.com/clarity/find-clarity-in-one-day&lt;/a&gt;&lt;br&gt;&lt;br&gt;I am not a believer on meditation. That would be the only point I would not accept from the article.&lt;br&gt;&lt;br&gt;The author begins the article this way:&lt;br&gt;&lt;div class=&quot;quote&quot;&gt;&lt;p&gt;Do you ever get so busy with the details of your life and the
countless things you need to complete, that you end up feeling
exhausted and disconnected?&lt;/p&gt;
&lt;p&gt;The result: Your mind becomes clouded and unable to focus and you
start to make poor decisions regarding your priorities. You end up
working hard instead of working smart.&lt;/p&gt;&lt;/div&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;How to start:&lt;/span&gt;&lt;br&gt;&lt;br&gt;Set aside &lt;span style=&quot;font-weight: bold;&quot;&gt;quality time&lt;/span&gt; to &lt;span style=&quot;font-weight: bold;&quot;&gt;enjoy and do the things you love to do&lt;/span&gt;, simple things like walking, hiking, watch people etc. Main point is to &lt;span style=&quot;font-weight: bold;&quot;&gt;turn off all distractions&lt;/span&gt; like phone and especially all media. &lt;span style=&quot;font-weight: bold;&quot;&gt;Enjoy everything that you are doing&lt;/span&gt; as you are doing it.&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Ideas from the author:&lt;/span&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;Brain dump: writing all your random thoughts down&lt;/li&gt;&lt;li&gt;Hiking&lt;/li&gt;&lt;li&gt;Biking&lt;/li&gt;&lt;li&gt;Working out&lt;/li&gt;&lt;li&gt;Book store (no magazines)&lt;/li&gt;&lt;li&gt;Listen to music&lt;/li&gt;&lt;li&gt;Watch people&lt;/li&gt;&lt;li&gt;Sit on your patio&lt;/li&gt;&lt;li&gt;Take 100 photos&lt;/li&gt;&lt;/ul&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00024/Scrolling-text-on-webpage</link><title>Scrolling text on webpage</title><category>web</category><description>I usually use the below code to add scrolling text on a webpage. You can see this on &lt;a href=&quot;http://macpup.org&quot; target=&quot;_blank&quot;&gt;http://macpup.org&lt;/a&gt;.
&lt;br&gt;
&lt;br&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre&gt;&lt;b&gt;Put this in your head section&lt;/b&gt;
&lt;br&gt;&lt;script language=&quot;Javascript&quot; type=&quot;text/javascript&quot;&gt;
&lt;br /&gt;message=&quot;Your favorite slogan&quot;;
&lt;br /&gt;pos=0;
&lt;br /&gt;maxlength=message.length+1;
&lt;br /&gt;function scrollmsg()
&lt;br /&gt;{
&lt;br /&gt;	if (pos&lt;maxlength)
&lt;br /&gt;	{
&lt;br /&gt;		txt=message.substring(0,pos);
&lt;br /&gt;		document.getElementById('scrolld1').innerHTML=txt;
&lt;br /&gt;		pos++;
&lt;br /&gt;		timer=setTimeout(&quot;scrollmsg()&quot;, 50);
&lt;br /&gt;	}
&lt;br /&gt;	else
&lt;br /&gt;	{
&lt;br /&gt;		pos=0;
&lt;br /&gt;		ts=setTimeout(&quot;scrollmsg()&quot;,3000);
&lt;br /&gt;	}
&lt;br /&gt;}
&lt;br /&gt;&lt;/script&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;&lt;b&gt;Add the below to your body section, wherever you feel appropriate:&lt;/b&gt;
&lt;br&gt;&lt;div id=&quot;scrolld1&quot;&gt;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;&lt;b&gt;Change your body section:&lt;/b&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00022/To-Write</link><title>To Write</title><category>web</category><description>Just noting down some topics to add. Need to collect more information to add these.
&lt;br&gt;- Basics: Register, host and run a website
&lt;br&gt;- Recipes from my wife's notes
&lt;br&gt;- Rexx: Main code, panels, skeletons and everything in a single module
&lt;br&gt;- Protecting your site from bad spiders
&lt;br&gt;- Awstats and how to configure GeoIP
&lt;br&gt;- Adding a count down on the download page&lt;br&gt;- Learnings from creating Pritlog&lt;br&gt;- Things to remember when dealing with files in PHP&lt;br&gt;- Measure your site hits and statistics (awstats, analytics)&lt;br&gt;- Simple photography tips&lt;br&gt;- Interesting websites you may/may not know&lt;br&gt;- What to expect after having a baby&lt;br&gt;- What to do when your 1 year old doesnt eat&lt;br&gt;- How to program keyless entry remote for a Camry&lt;br&gt;- Learning from a project in crisis&lt;br&gt;- Plugins for Pritlog&lt;br&gt;&lt;br&gt;- George Foreman's grill&lt;br&gt;- Read between lines - self service car wash ...&lt;br&gt;- Learning about sessions and other things from 0.412&lt;br&gt;&lt;br&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00021/Linux-BSD-Versions-I-have-tried</link><title>Linux/BSD Versions I have tried</title><category>linux</category><description>I have tried atleast 40-45 distributions and wanted to write atleast 1 line about the below ones. The list is sorted based on the popularity as mentioned on &lt;a href=&quot;http://distrowatch.com&quot; target=&quot;_blank&quot;&gt;http://distrowatch.com&lt;/a&gt; at the time of writing.
&lt;br&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://www.ubuntu.com/&quot; target=&quot;_blank&quot;&gt;Ubuntu&lt;/a&gt;: Very stable and the most popular version. But since it is purely open source, the codecs required to play dvd's, and some formats need to be additionally installed.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.opensuse.org/&quot; target=&quot;_blank&quot;&gt;OpenSuse&lt;/a&gt;: Is very popular, but on my laptop, did not do a good job.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://fedoraproject.org/&quot; target=&quot;_blank&quot;&gt;Fedora&lt;/a&gt;: Almost similar as OpenSuse. Codecs need to be installed.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://linuxmint.com/&quot; target=&quot;_blank&quot;&gt;Mint&lt;/a&gt;: This is Ubuntu with all required codecs and libraries and it is beautiful with Compiz working by default.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.pclinuxos.com/&quot; target=&quot;_blank&quot;&gt;PCLinuxOS&lt;/a&gt;: This is based on Mandriva and has excellent hardware recognition. 
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.mandriva.com/&quot; target=&quot;_blank&quot;&gt;Madriva&lt;/a&gt;: Additional codecs need to be installed. But works pretty well.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.dreamlinux.com.br/&quot; target=&quot;_blank&quot;&gt;Dreamlinux&lt;/a&gt;: Had difficulty working on my wireless. Is beautiful though.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.freebsd.org/&quot; target=&quot;_blank&quot;&gt;FreeBSD&lt;/a&gt;: Not Linux, but is very stable and popular as a server.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://puppylinux.com/&quot; target=&quot;_blank&quot;&gt;Puppy&lt;/a&gt;: &lt;b&gt;My favorite distribution.&lt;/b&gt; Extremely light, Superfast and fully functional. Most friendly linux community.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.zenwalk.org/&quot; target=&quot;_blank&quot;&gt;Zenwalk&lt;/a&gt;: Worked okay on my laptop. But wireless did not work.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.slax.org/&quot; target=&quot;_blank&quot;&gt;Slax&lt;/a&gt;: Lightweight and easily customizable. This started me off into Linux.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.pcbsd.org/&quot; target=&quot;_blank&quot;&gt;PC-BSD&lt;/a&gt;: User friendly version of FreeBSD. Worked well on my laptop.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.thinkgos.com/&quot; target=&quot;_blank&quot;&gt;gOS&lt;/a&gt;: Again a beautiful version of Ubuntu. Compiz and AWN is installed by default.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.elivecd.org/&quot; target=&quot;_blank&quot;&gt;Elive&lt;/a&gt;: Most popular distro that uses Enlightenment as the window manager. My wireless did not work. Is a beautiful version. 
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://tinyme.mypclinuxos.com/&quot; target=&quot;_blank&quot;&gt;TinyMe&lt;/a&gt;: Very lightweight version of PCLinuxOS.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.openbsd.org/&quot; target=&quot;_blank&quot;&gt;OpenBSD&lt;/a&gt;: Claimed to be the most secure OS. But is not user friendly for the end user.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://kiwilinux.org/&quot; target=&quot;_blank&quot;&gt;Kiwi&lt;/a&gt;: Ubuntu with all codecs and libraries.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.slitaz.org/&quot; target=&quot;_blank&quot;&gt;Slitaz&lt;/a&gt;: Smallest, beautiful distro (under 30 MB now). Lacks wireless modules, extra codecs etc. Codecs/Flash can be easily installed.
&lt;/li&gt;&lt;/ol&gt;
&lt;br&gt;Last but not least, here is a version I created based on Puppy Linux (my favorite).
&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://macpup.org/&quot; target=&quot;_blank&quot;&gt;Macpup&lt;/a&gt;: This is a beautiful remaster of Puppy Linux. 
&lt;/li&gt;&lt;/ul&gt;
&lt;br&gt;&lt;b&gt;If you would like to try out Linux, here are my recommendations:&lt;/b&gt;
&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://macpup.org/&quot; target=&quot;_blank&quot;&gt;Macpup&lt;/a&gt; or &lt;a href=&quot;http://puppylinux.com/&quot; target=&quot;_blank&quot;&gt;Puppy&lt;/a&gt;: Actually, if you want to see the beauty and speed of Linux, try this.
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://kiwilinux.org/&quot; target=&quot;_blank&quot;&gt;Kiwi&lt;/a&gt; or &lt;a href=&quot;http://linuxmint.com/&quot; target=&quot;_blank&quot;&gt;Mint&lt;/a&gt;: Stability of Ubuntu, with all required codecs, flash and libraries pre-installed.
&lt;/li&gt;&lt;/ul&gt;
&lt;br&gt;One best part about the linux versions are that most of them have &lt;b&gt;Livecd&lt;/b&gt; versions. You can boot using this CD into the OS and test it out. There is no need of an installation to test. Also, &lt;b&gt;Puppy Linux (or Macpup)&lt;/b&gt;, can be run from a livecd always, with your personal settings saved to the hard disk.</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00020/About-this-blog</link><title>About this blog</title><category>general</category><description>This is my first post on this blog. 
&lt;br&gt;
&lt;br&gt;Basically I want to use this as a diary where I can document anything I learn. It maybe new, maybe something I already know, but came across again. I am doing this so that I can search through and also point others to read if they want to know something that I already know. 
&lt;br&gt;
&lt;br&gt;Please read this blog with mercy. I am in no way claiming that everything is original. These are only my notes of something I read or found out from somewhere.
&lt;br&gt;
&lt;br&gt;Hope this helps my family, friends and myself. </description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00019/Is-the-Google-generation-smart</link><title>Is the Google generation smart?</title><category>web</category><description>I came across this wonderful and thought provoking article today. Really made me think.
&lt;br&gt;
&lt;br&gt;Here is the link to the article. &lt;b&gt;I would recommend reading the full article on this link.&lt;/b&gt;
&lt;br&gt;&lt;a href=&quot;http://technology.timesonline.co.uk/tol/news/tech_and_web/the_web/article4362950.ece&quot; target=&quot;_blank&quot;&gt;http://technology.timesonline.co.uk/tol/news/tech_and_web/the_web/article4362950.ece&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;This might be a long post as I am trying to quote the important statements from the article.
&lt;br&gt;
&lt;br&gt;&lt;div class=&quot;quote&quot;&gt;In particular, there is the great myth of multitasking. No human being, he says, can effectively write an e-mail and speak on the telephone. Both activities use language and the language channel in the brain can’t cope. Multitaskers fool themselves by rapidly switching attention and, as a result, their output deteriorates.&lt;/div&gt;
&lt;br&gt;&lt;div class=&quot;quote&quot;&gt;One American study found that interruptions take up 2.1 hours of the average knowledge worker’s day. This, it was estimated, cost the US economy $588 billion a year.&lt;/div&gt;
&lt;br&gt;&lt;div class=&quot;quote&quot;&gt;Television was the first culprit. Tests clearly show that a switched-on television reduces the quality and quantity of interaction between children and their parents. The internet multiplies the effect a thousandfold. Paradoxically, the supreme information provider also has the effect of reducing information intake.&lt;/div&gt;
&lt;br&gt;&lt;div class=&quot;quote&quot;&gt;Now teenagers just go to their laptops on coming home from school and sink into their online cocoon. But this isn’t the informational paradise dreamt of by Bill Gates and Google: 90% of sites visited by teenagers are social networks. They are immersed not in knowledge but in “gossip and social banter”.&lt;/div&gt;
&lt;br&gt;&lt;div class=&quot;quote&quot;&gt;Teenagers are being groomed to think others can be picked up on a whim and dropped because of a mood or some slight offence. The fear is that the idea of sticking with another through thick and thin – the very essence of friendship and love – will come to seem absurd, uncool, meaningless.&lt;/div&gt;
&lt;br&gt;&lt;div class=&quot;quote&quot;&gt;They have all noted – either in themselves or in others – diminishing attention spans, inability to focus, a loss of the meditative mode. “I can’t read War and Peace any more,” confessed one of Carr’s friends. “I’ve lost the ability to do that. Even a blog post of more than three or four paragraphs is too much to absorb. I skim it.”&lt;/div&gt;
&lt;br&gt;&lt;b&gt;So what is the solution?&lt;/b&gt;
&lt;br&gt;
&lt;br&gt;&lt;div class=&quot;quote&quot;&gt;The brain is malleable. Just as it can be trained to be distracted, so it can be trained to pay attention. Education and work can be restructured to teach and propagate the skills of concentration and focus. People can be taught to turn off, to ignore the beep and the ping.&lt;/div&gt;
&lt;br&gt;- Enjoy the simple things in life
&lt;br&gt;- Read books once in a while 
&lt;br&gt;- Avoid multi tasking 
&lt;br&gt;- Stop listening to your ipod always</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00018/Allway-Sync--File-synchronization</link><title>Allway Sync: File synchronization</title><category>computers</category><description>I already mentioned this in the last post. But thought of having a separate post for this as I love this application.
&lt;br&gt;
&lt;br&gt;This is a free file synchronization software available from the below link:
&lt;br&gt;&lt;a href=&quot;http://allwaysync.com/&quot; target=&quot;_blank&quot;&gt;http://allwaysync.com/&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;Here is a statement from their website:
&lt;br&gt;&lt;div class=&quot;quote&quot;&gt; Allway Sync is free file and folder synchronization software for Windows.
&lt;br&gt;
&lt;br&gt;Allway Sync uses innovative synchronization algorithms to synchronize your data between desktop PCs, laptops, USB drives and more. Allway Sync combines bulletproof reliability with an extremely easy-to-use interface.&lt;/div&gt;
&lt;br&gt;There are multiple versions available. If you are using this on a USB or using portable apps version, make sure you download the appropriate version from their website. 
&lt;br&gt;
&lt;br&gt;You can create multiple jobs to synchronize multiple directories. This is the easiest way to keep your computers at two different locations in sync. </description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00017/Carry-your-applications-with-you</link><title>Carry your applications with you</title><category>computers</category><description>You might have noticed that some USB sticks come with a menu similar to your start menu and also applications. I have a Sandisk U3 cruzer USB drive and this has an application called U3 that enables this kind of menu and many applications can be installed onto this.
&lt;br&gt;
&lt;br&gt;There is another way you can achieve the same. You can download Portable apps from the below link. 
&lt;br&gt;&lt;a href=&quot;http://portableapps.com/&quot; target=&quot;_blank&quot;&gt;http://portableapps.com/&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;Here is a statement from their website:
&lt;br&gt;&lt;div class=&quot;quote&quot;&gt;Now you can carry your favorite computer programs along with all of your bookmarks, settings, email and more with you. Use them on any Windows computer. All without leaving any personal data behind.&lt;/div&gt;
&lt;br&gt;Once you have installed the portable apps suite, you can select various portable versions of applications like:
&lt;br&gt;- Mozilla Firefox
&lt;br&gt;- Opera
&lt;br&gt;- Filezilla
&lt;br&gt;
&lt;br&gt;There are SSH, Anti virus, directory sync, music players, chat clients etc available as portable apps. This is very interesting and useful. 
&lt;br&gt;
&lt;br&gt;One portable app I love is called &lt;b&gt;Alway Sync&lt;/b&gt;. This is a free program that can be used &lt;b&gt;to keep directories in sync&lt;/b&gt;. </description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00016/Website-directory-list</link><title>Website directory list</title><category>web</category><description>The default behavior of websites is that if you dont have index.html, index.php or a similar index page, then it just displays a list of files in the directory on the website.
&lt;br&gt;
&lt;br&gt;There are some hosting companies that disable this for security reasons, which is good. But in some cases, you just want to give the list of files to visitors for download or viewing.  
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00017/Carry-your-applications-with-you&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00015/Punctured-radiator---replace-engine</link><title>Punctured radiator = replace engine?</title><category>automotive</category><description>One of my colleagues had given his car for repair after it had stalled all of a sudden.
&lt;br&gt;
&lt;br&gt;The mechanic reported that the radiator was punctured and since he had driven his car for sometime after this happened, the engine became too hot. Even the spark plugs were fused into the engine due to the heat. They mentioned that the engine might need to be replaced.
&lt;br&gt;&lt;$500 to replace the radiator
&lt;br&gt;$6000 to replace the engine
&lt;br&gt;
&lt;br&gt;If he had glanced at the temperature gauge on the car and stopped the car when it was too hot, he could have saved the engine. 
&lt;br&gt;
&lt;br&gt;I never have the habit of looking at the temperature gauge. So this is an important lesson - make sure to glance at your temperature gauge once in a while.</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00013/Opensource---Try-before-you-install</link><title>Opensource - Try before you install</title><category>web</category><description>Many may not know about this wonderful website. I dont remember how I came across this one either. The site is:
&lt;br&gt;&lt;a href=&quot;http://opensourcecms.com/&quot; target=&quot;_blank&quot;&gt;http://opensourcecms.com/&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;This site has demo installations of various open source packages/applications. Before we try installing any on our own site, we get to try out these packages on this website. &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00015/Punctured-radiator---replace-engine&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00012/Boli--my-wifes-favorite-snack</link><title>Boli (my wife's favorite snack)</title><category>cooking</category><description>I got this recipe from my wife's sister. This is a tasty Indian snack (for those who dont know).
&lt;br&gt;
&lt;br&gt;&lt;b&gt;Ingredients:&lt;/b&gt;
&lt;br&gt;Bengalgram dal -2 cups
&lt;br&gt;Sugar - 2 cups
&lt;br&gt;Maida -1 1/2 cups
&lt;br&gt;vege Oil -1/2 cup
&lt;br&gt;cadamom powder -1/2-1 tsp
&lt;br&gt;kesari powder{I added turmeric powder1sp} - a few pinch( for yellow colour)
&lt;br&gt;Rice flour for spreading on board
&lt;br&gt;Ghee for frying
&lt;br&gt;
&lt;br&gt;&lt;b&gt;Preparation Method:&lt;/b&gt;
&lt;br&gt;1. Boil the gram with plenty of water. When nicely cooked strain.
&lt;br&gt;Again add water, boil &amp; drain.
&lt;br&gt;2. Add sugar &amp; cardamom powder to the cooked gram &amp; keep on low heat
&lt;br&gt;till the mixture becomes semi solid. Stir constantly.
&lt;br&gt;3. Remove from fire &amp; grind to a fine paste.
&lt;br&gt;4. Add kesari powder to the maida flour and with a little water, make
&lt;br&gt;into a dough.
&lt;br&gt;5. Pour  oil into the dough &amp; knead until it becomes very soft.Keep it
&lt;br&gt;aside for 2 or more hours .
&lt;br&gt;6. Make equal number of balls with the dough &amp; the gram mixture.
&lt;br&gt;7. Take a ball of gram, cover it with maida ball &amp; turn on to a
&lt;br&gt;floured board (rice flour to be used on the board) &amp; roll out as
&lt;br&gt;thinly as possible.
&lt;br&gt;8. Apply a little ghee on griddle &amp; fry (like we do for chappatis) the
&lt;br&gt;boli on it.
&lt;br&gt;
&lt;br&gt;Enjoy!</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00011/When-your-little-one-has-diaper-rash</link><title>When your little one has diaper rash</title><category>family</category><description>Our baby has had diaper rash couple of times. Recently, he had diarrhea and the diaper rash was bad. 
&lt;br&gt;
&lt;br&gt;The below method worked well for us in getting through this phase.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00012/Boli--my-wifes-favorite-snack&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00010/Caramel-pudding</link><title>Caramel pudding</title><category>cooking</category><description>&lt;b&gt;Ingredients:&lt;/b&gt;
&lt;br&gt;Milk- 1/2 liter
&lt;br&gt;sugar-1 1/2 cups
&lt;br&gt;eggs-3
&lt;br&gt;vanilla essence- 1/2 teaspoon.
&lt;br&gt;
&lt;br&gt;&lt;b&gt;Method:&lt;/b&gt;
&lt;br&gt;
&lt;br&gt;Beat eggs and sugar (1 1/2 cups) till creamy. Add milk and stir till the sugar dissolves completely. Add essence.
&lt;br&gt;
&lt;br&gt;&lt;b&gt;Ingredients for caramel&lt;/b&gt;: Sugar 1/2 cup, water 3 tablespoons
&lt;br&gt;
&lt;br&gt;&lt;b&gt;Method:&lt;/b&gt; In a hard bottomed pan heat sugar without adding water till sugar melts into a thick golden brown liquid. Remove from fire and immediately add the water. Return to fire and stir till it becomes a golden brown syrup. Pour this into a baking tray so as to coat the base of the tray. Cool for sometime and pour the prepared milk mixture carefully. Bake till set. Serve hot or cold.
&lt;br&gt;
&lt;br&gt;&lt;b&gt;Important:&lt;/b&gt; Be careful while preparing the caramel as sugar melts at a very high temperature.</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00009/Maternity--Vitamins-and-Supplements</link><title>Maternity: Vitamins and Supplements</title><category>family</category><description>These are the essential vitamins and supplements that should be taken when expecting. These must be consumed in addition to the regular healthy diet.
&lt;br&gt;
&lt;br&gt;1 - &lt;b&gt;Calcium (1200 mg per day) &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00010/Caramel-pudding&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00008/Software-I-install-on-a-new-PC</link><title>Software I install on a new PC</title><category>computers</category><description>Having done this a few times already, I thought of documenting this.
&lt;br&gt;
&lt;br&gt;As soon as I get a Windows based PC, I usually install the following:
&lt;br&gt;
&lt;br&gt;- &lt;a href=&quot;http://www.openoffice.org/&quot; target=&quot;_blank&quot;&gt;Openoffice&lt;/a&gt; (alternative to MS Office)
&lt;br&gt;- &lt;a href=&quot;http://filezilla-project.org/&quot; target=&quot;_blank&quot;&gt;Filezilla&lt;/a&gt; (FTP client to transfer files to my websites)
&lt;br&gt;- &lt;a href=&quot;http://www.mozilla.com/firefox/&quot; target=&quot;_blank&quot;&gt;Mozilla Firefox&lt;/a&gt; (free and powerful browser)
&lt;br&gt;- &lt;a href=&quot;http://messenger.yahoo.com/&quot; target=&quot;_blank&quot;&gt;Yahoo messenger&lt;/a&gt; (chat software)
&lt;br&gt;- &lt;a href=&quot;http://www.pidgin.im/&quot; target=&quot;_blank&quot;&gt;Pidgin&lt;/a&gt; (Can do yahoo, google and other chats with this)
&lt;br&gt;- &lt;a href=&quot;http://www.skype.com/&quot; target=&quot;_blank&quot;&gt;Skype&lt;/a&gt; (Voip)
&lt;br&gt;- &lt;a href=&quot;http://www.gizmoproject.com/&quot; target=&quot;_blank&quot;&gt;Gizmo Project&lt;/a&gt;(alternative to skype)
&lt;br&gt;- &lt;a href=&quot;http://cdrtfe.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;Cdrtfe&lt;/a&gt; for windows (lightweight cd writing solution)
&lt;br&gt;- &lt;a href=&quot;http://www.izarc.org/&quot; target=&quot;_blank&quot;&gt;Izarc&lt;/a&gt; (alternative to Winzip)
&lt;br&gt;- &lt;a href=&quot;http://www.contexteditor.org/&quot; target=&quot;_blank&quot;&gt;Context Editor&lt;/a&gt; (very good editor for PHP, HTML and in general)
&lt;br&gt;- &lt;a href=&quot;http://www.revouninstaller.com/revo_uninstaller_free_download.html&quot; target=&quot;_blank&quot;&gt;Revo Uninstaller&lt;/a&gt; (Powerful uninstaller)
&lt;br&gt;
&lt;br&gt;Most of the above are &lt;b&gt;free and open source&lt;/b&gt;. Also, these are proven popular packages.</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00007/Add-lightbox-to-your-site</link><title>Add lightbox to your site</title><category>web</category><description>I have noticed that nowadays many websites use ajax to show enlarged images. When you click on an image, instead of the image opening in a new browser window, it opens using animation and zoom. This can be used to view multiple images on a website like a gallery.
&lt;br&gt;
&lt;br&gt;Started searching for this. I did know about lightbox javascript library. But the one that impressed me finally is called prettyPhoto. This is a lightbox clone using jQuery. jQuery is a very powerful javascript library that I am very familiar with. I love this because of its simpilcity and because of all the plugins available to extend this.
&lt;br&gt;
&lt;br&gt;Here is the link to the prettyPhoto library.
&lt;br&gt;&lt;a href=&quot;http://www.no-margin-for-errors.com/projects/prettyPhoto/&quot; target=&quot;_blank&quot;&gt;http://www.no-margin-for-errors.com/projects/prettyPhoto/&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;It is very simple to add to your website. You can see this working on my website below: (Try clicking an image on the website)
&lt;br&gt;&lt;a href=&quot;http://macpup.org/&quot; target=&quot;_blank&quot;&gt;http://macpup.org/&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00006/Need-live-support-for-your-site</link><title>Need live support for your site?</title><category>web</category><description>I had never heard of a free application for providing live support / live chat on a website.
&lt;br&gt;
&lt;br&gt;One of my friends (Eric) mentioned this the other day. It is called Crafty Syntax and I am posting the link below:
&lt;br&gt;&lt;a href=&quot;http://www.craftysyntax.com/&quot; target=&quot;_blank&quot;&gt;http://www.craftysyntax.com/&lt;/a&gt; 
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00007/Add-lightbox-to-your-site&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00005/Random-Tips</link><title>Random Tips</title><category>tips</category><description>I got the below from a forwarded email from a friend. I thought it is helpful. Hoping to add more as and when I come across any.
&lt;br&gt;
&lt;br&gt;- To keep potatoes from budding, place an apple in the bag with the potatoes. 
&lt;br&gt;
&lt;br&gt;- When  a cake recipe calls for flouring the baking pan, use a bit of the dry  cake mix instead and there won't be any white mess on the outside of  the cake. 
&lt;br&gt;
&lt;br&gt;- If you accidentally over salt a dish while it's still cooking, drop in a peeled potato and it will absorb the excess salt for an instant 'fix-me-up.' 
&lt;br&gt;
&lt;br&gt;- Wrap celery in aluminum foil when putting in the refrigerator and it will keep for weeks. 
&lt;br&gt;
&lt;br&gt;- Brush  some beaten egg white over pie crust before baking to yield a  beautiful glossy finish. 
&lt;br&gt;
&lt;br&gt;- Cure for  headaches: take a lime, cut it in half and rub it on your forehead.  The throbbing will go away. 
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00006/Need-live-support-for-your-site&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00004/How-to-build-a-shopping-site</link><title>How to build a shopping site</title><category>web</category><description>Once when I was asked by a friend to do their shopping site, I suggested ready made paid solutions like Godaddy.com, Amazon or even sell it through ebay. There are packages available from Godaddy and from few other websites that are paid and that give you the complete shopping cart funtionality. 
 &lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00005/Random-Tips&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00003/Youtube---Fullscreen-Playlists</link><title>Youtube - Fullscreen Playlists</title><category>web</category><description>We started finding videos on youtube and creating playlists out of them. But when playing from Youtube, the videos do not play in fullscreen continuously.
&lt;br&gt;
&lt;br&gt;Searching on the web, I came across this code:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hardkap.net/blog/index.php/viewEntry/00004/How-to-build-a-shopping-site&quot;&gt;Continue reading&lt;/a&gt;</description></item><item><link>http://hardkap.net/blog/index.php/viewEntry/00002/Broken-Engine-Gasket</link><title>Broken Engine Gasket?</title><category>automotive</category><description>I have the privilege of sitting besides a car expert (Robert). He has driven his Toyota Camry for over 600,000 miles. He fixes everything by himself, thus saving thousands of dollars.
&lt;br&gt;
&lt;br&gt;Today one other colleague came to him and told about his Honda that stalled on the road with a check engine light on. He had taken it to the Honda service. And they reported that the Radiator and engine gasket need to be replaced. 
&lt;br&gt;
&lt;br&gt;Then Robert was mentioning a very easy check to see and confirm that the gasket was indeed the problem. He suggested checking the oil cap and &lt;b&gt;if you notice Vaseline like creamy coating on the cap&lt;/b&gt;, then it might be a gasket leak. This is formed because the coolant leaks and mixes with the oil.</description></item></channel></rss>