<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rochak Chauhan::Unpredictably Exciting &#187; Tips and Tricks</title>
	<atom:link href="http://rochakchauhan.com/blog/category/tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://rochakchauhan.com/blog</link>
	<description>Know your limits, but never stop trying to exceed them.</description>
	<lastBuildDate>Thu, 03 May 2012 11:48:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>India will become Number 1 source of PHP developers soon</title>
		<link>http://rochakchauhan.com/blog/2009/07/30/india-will-become-number-1-source-of-php-developers-soon/</link>
		<comments>http://rochakchauhan.com/blog/2009/07/30/india-will-become-number-1-source-of-php-developers-soon/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 09:07:26 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[General News]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[India PHP Developers Nunber 1]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/?p=949</guid>
		<description><![CDATA[The number of Indian PHP developers has been growing at a large pace in the last few years, when compared to other countries. A few years ago, India was just one of the top ten countries with more PHP developers. Now India is number 2 and is almost surpassing United States, which is still number &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2009/07/30/india-will-become-number-1-source-of-php-developers-soon/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>The number of Indian PHP developers has been growing at a large pace in the last few years, when compared to other countries. A few years ago, India was just one of the top ten countries with more PHP developers. Now India is number 2 and is almost surpassing United States, which is still number 1.</p>
<p>This article presents a reflection about why this growth happened just in the latest years, as well what it means for the PHP world.</em></p>
<p><em><a title="India will become number 1 source of PHP developers soon" href="http://www.phpclasses.org/blog/post/99-India-will-become-number-1-source-of-PHP-developers-soon.html" target="_blank">Click here to read the full post&#8230;</a><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2009/07/30/india-will-become-number-1-source-of-php-developers-soon/feed/</wfw:commentRss>
		<slash:comments>498</slash:comments>
		</item>
		<item>
		<title>This is how to Fully Unlock an iPhone 3G</title>
		<link>http://rochakchauhan.com/blog/2009/01/26/this-is-how-to-fully-unlock-an-iphone-3g/</link>
		<comments>http://rochakchauhan.com/blog/2009/01/26/this-is-how-to-fully-unlock-an-iphone-3g/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 14:07:47 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Discussion]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Tech News]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[3G 2.2]]></category>
		<category><![CDATA[iPhone 3G]]></category>
		<category><![CDATA[unlock iPhone]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/?p=781</guid>
		<description><![CDATA[If you are a developer, geek or IT guru then you should not face any issues reading and implementing the following steps. But if you are doing it for the first time or are just a wanna be cracker, then read these jargon before starting: Firmware: It is the software / OS of your iPhone. &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2009/01/26/this-is-how-to-fully-unlock-an-iphone-3g/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you are a developer, geek or IT guru then you should not face any issues reading and implementing the following steps. But if you are doing it for the first time or are just a wanna be cracker, then read these jargon before starting:</p>
<ul>
<li><strong>Firmware: </strong>It is the software / OS of your iPhone. This hack is for 2.2 version.</li>
<li><strong>Jailbreak: </strong>It simply means that to enable your iPhone to be able to install third party applications. In laymans terms it makes your iPhone to install application which are not form the Application store.</li>
<li><strong>Unlock</strong>: It means that your iPhone can accept SIM from any mobile provider.</li>
</ul>
<p><strong>PS:</strong> <em>Please note, this hack will only work on <strong>iPhone 3G with firmware version 2.2</strong>. If you don&#8217;t have the latest firmware then upgrade it using iTunes. The catch with this hack is that you can only use one unlocked SIM card. In other words, if you ever want to use another SIM, you have to do the entire process again. </em></p>
<ol>
<li>Upgrade your iTunes to 8.0.2 by launching it and clicking &#8220;Download iTunes&#8221; below. Or <a href="http://filehippo.com/download_itunes/">download it</a> and install it manually.<br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2008/11/itunes802.jpg" border="0" alt="itunes802" width="381" height="134" /></li>
<li>Allow iTunes to upgrade your iPhone to the latest 2.2 firmware. Don’t worry about the implications (losing jailbreak, unlock) as QuickPwn will take care of this for your. This step is necessary because QuickPwn doesn’t actually upgrade your iPhone. Instead, QuickPwn expects to be pwning the same firmware that your iPhone is on. If you don’t know anything about baseband versions, you can ignore this message. Otherwise, make sure you’ve updated your iPhone to be running on 02.28.00 baseband firmware, which should have been included in the 2.2 firmware update.</li>
<li>Download QuickPwn 2.2 for <a href="http://www.filesavr.com/quickpwn22">Windows</a> or <a href="http://www.filesavr.com/quickpwn22_1">Mac</a>. Extract the file and launch the QuickPwn 2.2 application. Then follow the prompt and connect your iPhone to your computer via the USB cable. When the blue arrow button lights up, click it.<br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2008/11/quickpwn22-usb.jpg" border="0" alt="quickpwn22_usb" width="500" height="435" /></li>
<li>QuickPwn is smart enough to detect the firmware ipsw file you downloaded via iTunes (something like <span style="text-decoration: underline;">C:\Documents and Settings\coderetard\Application Data\Apple Computer\iTunes\iPhone Software Updates\</span> on Windows XP). If it can’t find it for whatever reason, download the 2.2 restore firmware ipsw file for <a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5778.20081120.Aqw4R/iPhone1,2_2.2_5G77_Restore.ipsw">3G iPhone1,2_2.2_5G77_Restore.ipsw</a> directly from Apple’s servers. Then browse to the or restore firmware ipsw file you downloaded. After the green checkmark appears, click the blue arrow button.<br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2009/01/quickpwn22-3g-detect.jpg" border="0" alt="quickpwn22_3g_detect" width="500" height="435" /></li>
<li>On the next page, make sure you select the “Cydia” checkbox. You can check “Installer” and replace logo as desired. Click the arrow button after making your selections.<br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2009/01/quickpwn22-3g-options.jpg" border="0" alt="quickpwn22_3g_options" width="500" height="435" /></li>
<li>Now get ready to rumble…<br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2009/01/quickpwn22-3g-connect.jpg" border="0" alt="quickpwn22_3g_connect" width="500" height="435" /></li>
<li>READ THIS STEP THROUGH COMPLETELY FIRST, lest you be caught off guard: Click on the Blue arrow button which will bring up a screen with some instructions (below). Follow them exactly to a tee. Just to prepare, here are the directions: 1) Hold Home for 5 seconds, 2) Hold Home and Power together for 10 seconds, 3) Release Power but continue to hold Home for 30 seconds. Throughout the process these three steps, you DO NOT LET GO OF THE HOME BUTTON until after the third step. I didn’t have to hold it anymore after it counted down to 21 seconds left.<br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2008/11/quickpwn22-dfu.jpg" border="0" alt="quickpwn22_dfu" width="500" height="378" /></li>
<li>Then sit back and relax while QuickPwn does all the hard work for you, you’ll see some activity on your iPhone screen and hear your computer beep a few times, but when it restarts finally and says it’s waiting for activation, it’s ready to use. Now you can close QuickPwn.<br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2008/11/quickpwn22-done.jpg" border="0" alt="quickpwn22_done" width="500" height="435" /></li>
<li>It’s now a good time to set up your wireless network settings on your iPhone 3G so you will be able to connect to the software repositories in Cydia.</li>
<li>Now Launch the Cydia app, which will reorganize then restart. You’ll need to launch it again afterwards.</li>
<li>When prompted at the &#8220;Who Are You&#8221; screen, just choose the first option &#8220;User (Graphical Only).&#8221;<br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2009/01/cydia-user.png" border="0" alt="cydia_user" width="320" height="480" /></li>
<li>Click on the Manage tab on the bottom menu bar. In the Manage tab, click on the Sources button in the middle. You will need to add the source to the yellowsn0w repo to utilize the soft unlock.<br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2009/01/cydia-sources.png" border="0" alt="cydia_sources" width="320" height="480" /></li>
<li>Click on &#8220;Edit&#8221; on the top right, then &#8220;Add&#8221; on the top left. In the URL, type: <a href="http://blog.iphone-dev.org/post/67797811/dont-eat-yellowsn0w">http://apt9.yellowsn0w.com/</a> as shown below. When you are done click &#8220;Done&#8221; and then &#8220;Browser.&#8221;<br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2009/01/cydia-repo-yellowsn0w.png" border="0" alt="cydia_repo_yellowsn0w" width="320" height="480" /></li>
<li>Now click on the &#8220;Search&#8221; tab and type &#8220;yellowsn0w&#8221; and install the app &#8220;yellowsn0w.&#8221;<br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2009/01/cydia-search-yellowsn0w.png" border="0" alt="cydia_search_yellowsn0w" width="320" height="480" /><br />
<img style="border-width: 0px;" src="http://www.coderetard.com/wp-content/uploads/2009/01/cydia-yellowsn0w.png" border="0" alt="cydia_yellowsn0w" width="320" height="480" /></li>
<li>For US T-Mobile users, you will need to disable the &#8220;Enable 3G&#8221; setting in your network settings.</li>
<li>Now restart your iPhone 3G with your SIM card inserted. Wait for the slide to unlock screen and then wait 15 seconds more. If you don’t see the SIM card working, reinsert the SIM and wait another 10 seconds. Now try and make some calls with your newly unlocked iPhone 3G!</li>
<li>For T-Mobile users, continue reading if you have problems:</li>
<li>Download and install BossPrefs and via Cydia</li>
<li>Disable all functions with BossPrefs (don’t worry if you can’t disable EDGE)</li>
<li>Reboot your Phone with BossPrefs (not the normal manual way &#8211; this is important!)</li>
<li>Wait a minute and a half when you see the slick to unlock screen</li>
<li>Take out your T-Mobile SIM card and insert it again</li>
<li>Wait for 10 seconds</li>
<li>Go to Settings and turn on Airplane mode, then turn it off again</li>
<li>Take out your T-Mobile SIM card and put in any AT&amp;T SIM card and wait for a minute. Ignore the &#8220;Waiting to activate&#8221; prompt</li>
<li>Now take out the AT&amp;T SIM card and put in your T-Mobile SIM card again</li>
<li>After a moment you will see the activation succeeded prompt. Now you should be able to pick up a T-Mobile signal</li>
</ol>
<p>Find Original Post at:  <a title="Unlock iPhone 3G" href="http://www.coderetard.com/2009/01/01/how-to-fully-soft-unlock-iphone-3g-22-firmware-yellowsn0w/" target="_blank">http://www.coderetard.com/2009/01/01/how-to-fully-soft-unlock-iphone-3g-22-firmware-yellowsn0w/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2009/01/26/this-is-how-to-fully-unlock-an-iphone-3g/feed/</wfw:commentRss>
		<slash:comments>343</slash:comments>
		</item>
		<item>
		<title>How to secure your Wi-Fi network?</title>
		<link>http://rochakchauhan.com/blog/2008/10/05/how-to-secure-your-wi-fi-network/</link>
		<comments>http://rochakchauhan.com/blog/2008/10/05/how-to-secure-your-wi-fi-network/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 15:21:46 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Discussion]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[make wifi secure]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[WAP]]></category>
		<category><![CDATA[WEP]]></category>
		<category><![CDATA[wi-fi]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/?p=479</guid>
		<description><![CDATA[Why make Wi-Fi network secure? While investigating the recent bomb blasts in India, it was uncovered that terrorists of &#8220;Indian Mujahideen&#8221; used unsecured Wi-Fi networks to communicate with each other and planning there bomb blasts. Its very easy to blame Police and Government for their lack of vigilance, but it take character to acknowledge the &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/10/05/how-to-secure-your-wi-fi-network/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong><em>Why make Wi-Fi network secure?</em></strong></p>
<p>While investigating the recent bomb blasts in India, it was uncovered that terrorists of &#8220;Indian Mujahideen&#8221; used unsecured Wi-Fi networks to communicate with each other and planning there bomb blasts. Its very easy to blame Police and Government for their lack of vigilance, but it take character to acknowledge the fact even we are responsible for it. You, me and everyone who has an unsecured wifi network is or could be responsible for the blasts. So as one my duties as a citizen of India, I am explaining what is wifi network and how to make secure.</p>
<p><strong><em>What is a Wi-Fi network?</em></strong></p>
<p>Any computer network, which connects two more more wifi devices via a wifi router is termed as <em>wifi network</em>. In simple words, if you connect to internet via wifi router, then it simple means you are connected via a wifi network. It can be home, work or even a coffee shop.</p>
<p><strong><em>How to make your Wi-Fi network secured?</em></strong></p>
<ol>
<li><span style="text-decoration: underline;">Password protect your Wi-Fi Router Setup Wizard:</span>
<ul>
<li>All router comes with an inbuilt setup wizard. All you have to do is type the Router IP in your browser. Commonly used IP by Routers is:  http://192.168.8.1 You will see all sorts of settings and options in this wizard. However, you may be asked to authenticate via a username and password. Chances are by default there would be no password or a default (admin/admin) password setup by the manufacturer. So the very first step is to make sure this Router setup wizard or interface is password protected with a strong password. You can use <a href="http://strongpasswordgenerator.com/" target="_blank">strongpasswordgenerator </a>or <a href="http://www.goodpassword.com/" target="_blank">goodpassword </a>to get yourself a very strong password.</li>
</ul>
</li>
<li><span style="text-decoration: underline;">Disable SSID broadcasting.</span>
<ul>
<li>SSID or Service Set IDentifier, is responsible to display the name of your wifi network when ever a device scans for available networks.  I would recommend you disable this feature after you are connected to all your wifi devices, or else you will go in the hidden mode and even your  own  devices will fail to connect to your router.</li>
</ul>
</li>
<li><span style="text-decoration: underline;">Enable WPA or WEP encryption.</span>
<ul>
<li>In order to enable it, login to your router setup wizard. You can find this option user &#8220;Security&#8221; or &#8220;WAN Setup&#8221;. They both have same basic role, that is to authenticate every device when it tries to connect to the wifi router. However there is a functional difference between WPA and WEP security algorithm.
<ul>
<li><strong>WEP (Wired Equivalent Privacy): </strong>It would generate 4 password, and your devices needs to enter anyone of those during <a title="What is Handshake?" href="http://en.wikipedia.org/wiki/Handshake_(computing)" target="_blank">handshake</a>. It is recommended for your normal office or work security.<strong><br />
</strong></li>
<li><strong>WPA-PSK (Wi-Fi Protected Access Pre-Shared Key): </strong>It would generate a single  password, which can be configured  to expire after some predefined duration. It is good option for people who use internet for short periods only.<strong><br />
</strong></li>
</ul>
</li>
</ul>
</li>
<li><span style="text-decoration: underline;">Define maximum number of devices:</span>
<ul>
<li>This options comes into play when you know how many devices normally connect to the router. You can set the maximum limit, so that once all of the devices are connected and operational, no one else can connect to the wifi network.</li>
</ul>
</li>
<li><span style="text-decoration: underline;">Unshare the shared folder/drives:</span>
<ul>
<li>When not is use, it is recommended that you unshare all the folder/shared whenever not in use. Otherwise, they may be used to store and run Trojan / Virus.</li>
</ul>
</li>
<li><span style="text-decoration: underline;">Turn off the router when not in use:</span>
<ul>
<li>This will not only save you power, but make it virtually impossible for a hacker to use your internet conenction.</li>
</ul>
</li>
</ol>
<p>Please note, a serious hacker would not actually be deterred by all these measures, but it will make it hard for a novice hacker. If you have any query or need any consultancy to secure your wifi network secure, feel free to contact me via email or IM.</p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/10/05/how-to-secure-your-wi-fi-network/feed/</wfw:commentRss>
		<slash:comments>493</slash:comments>
		</item>
		<item>
		<title>How to speed up your PC?</title>
		<link>http://rochakchauhan.com/blog/2008/09/30/how-to-speed-up-your-pc/</link>
		<comments>http://rochakchauhan.com/blog/2008/09/30/how-to-speed-up-your-pc/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 04:21:11 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Improve PC Performance]]></category>
		<category><![CDATA[Improve PC Speed]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[Speed up]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/?p=445</guid>
		<description><![CDATA[Have you ever noticed that no matter how good your PC&#8217;s configuration is, it tends to get slower as the time passes by? Ever wondered why does this happen and how to fix? Well this is what I am going to explain and give you tips and tricks to fix it. Uninstall all the unused/unwanted &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/09/30/how-to-speed-up-your-pc/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Have you ever noticed that no matter how good your PC&#8217;s configuration is, it tends to get slower as the time passes by? Ever wondered why does this happen and how to fix? Well this is what I am going to explain and give you tips and tricks to fix it.</p>
<ol>
<li><em><strong>Uninstall all the unused/unwanted programs.</strong></em>
<ul>
<li><strong><em>Reason</em></strong>: Windows OS is based on the registry system. In simple words, what ever you install or any changes you make are stored in the Windows Registry and each time you start using your windows, it has to check the registry for installed programs and/or settings.  So the more programs and software you install, the slower your PC (Computer System) will become.</li>
<li><em><strong>Solution: </strong></em>Install only the programs/software which you frequently use. You can install software which you use once in a blue moon. Trust me, this will make a significant difference in the PC&#8217;s performance. Go ahead and uninstall all the programs you don&#8217;t use or use seldom. You can use a free third party utility <a title="Download CCleaner" href="http://www.filehippo.com/download_ccleaner/" target="_blank">CCleaner</a> to clean unwanted cookies, broken registry entries, tempary files.</li>
</ul>
</li>
<li><em><strong>Disable the visual effects (eye candy).</strong></em>
<ul>
<li><strong><em>Reason</em></strong>: Windows Xp onwards, Microsoft has implemented some need visual effect to take the user experience closed to that of a Mac. In the process, they made it very taxing on RAM and Processor. In Simple words, the more visual effects you enable, the slower your PC (Computer System) will become.</li>
<li><em><strong>Solution: </strong></em>If you are willing to compromise the eye candy effects for performance then this is what you do:
<ul>
<li>Right Click &#8220;My Computer&#8221; icon and click on properties.</li>
<li>Go to Advanced Tab and click on Setting button of &#8220;Performance&#8221;</li>
<li>Select the tab &#8220;Select for best performance&#8221; and press &#8220;apply&#8221;</li>
</ul>
</li>
</ul>
</li>
<li><em><strong>Scan for Virus, Spywares and Trojans. </strong></em>
<ul>
<li><strong><em>Reason</em></strong>: Most of the time, an infected system is the reason of  a painfully slow or crashing system, Make sure you have a lightweight Antivirus and Antispyware software installed. Not to mention, that software should be updated regularly too.</li>
<li><em><strong>Solution: </strong></em>Please view  <a title="How to clean an Infected PC" href="http://rochakchauhan.com/blog/2008/09/04/how-to-clean-and-infected-pc/" target="_blank">&#8220;How to clean an infected PC&#8221;</a> for more details.</li>
</ul>
</li>
<li><em><strong>Defrag your hard drive .</strong></em>
<ul>
<li><strong><em>Reason</em></strong>: Fragmentation is caused when an operating system breaks a file into pieces because there is not enough space on the storage device where the file was originally saved.  Hence, defragmentation can be defines as the process of scanning the file system and rejoining the split files back into consecutive pieces. Windows OS comes with an inbuilt utility, but if you want you could use third party software to defrag for hard drives.</li>
<li><em><strong>Solution: </strong></em>This is you to use the inbuilt defag utility:
<ul>
<li>Open &#8220;My Computers&#8221;. Right click any hard drive icon and go to properties.</li>
<li>Now under &#8220;Tools&#8221; tab, click &#8220;Defragment now&#8221; button.</li>
<li>Make sure you do NOT use your computer which the defragment process is in progress.</li>
</ul>
</li>
</ul>
</li>
<li><em><strong>Remove unwanted start up programs:</strong></em>
<ul>
<li><strong><em>Reason</em></strong>: As soon as you start your Windows, there are many programs and background processes which turns on automatically. Most of them are unwanted and makes the PC slow. Simple words you should have minimum amount of icons in the bottom right corner of your PC.</li>
<li><em><strong>Solution: </strong></em>Please disable only those programs or services which you are sure of. This step is not for novice users. This is how you disable unwanted start up programs:
<ul>
<li>Go to &#8220;Start&#8221; and click on &#8220;Run&#8221;</li>
<li>Type &#8220;msconfig&#8221; and press OK button.</li>
<li>From the popup window, select &#8220;start up&#8221; tab.</li>
<li>Now you will have a list of all the programs which starts automatically with Windows. Just uncheck the items to disable them. You need not to worry no much, you can always &#8220;undo&#8221; this step by re checking the items again.</li>
<li>You are also use an addition utility &#8220;<a title="Download Autorun" href="http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx" target="_blank">Autoruns</a>&#8221; by Windows to do the same.</li>
</ul>
</li>
</ul>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/09/30/how-to-speed-up-your-pc/feed/</wfw:commentRss>
		<slash:comments>364</slash:comments>
		</item>
		<item>
		<title>Most common JavaScript mistakes and their solutions</title>
		<link>http://rochakchauhan.com/blog/2008/09/25/most-common-javascript-mistakes/</link>
		<comments>http://rochakchauhan.com/blog/2008/09/25/most-common-javascript-mistakes/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 10:39:27 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JavaScript mistakes]]></category>
		<category><![CDATA[rochak.js]]></category>
		<category><![CDATA[solutions]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/?p=410</guid>
		<description><![CDATA[JavaScript has come a long way from being used just as Client Side Form Validator to becoming the backbone of Web 2.0 rich web applications. In the current scenario, every web developer have to learn JavaScript as there is hardly any Web 2.0 application which does not implement JavaScript. In my opinion followings are the &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/09/25/most-common-javascript-mistakes/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>JavaScript has come a long way from being used just as <em>Client Side Form Validator</em> to becoming the backbone of Web 2.0 rich web applications. In the current scenario, every web developer have to learn JavaScript as there is hardly any Web 2.0 application which does not implement JavaScript.</p>
<p>In my opinion followings are the most common errors/mistakes made during JavaScript implementation.</p>
<ol>
<li><strong><em>Calling JavaScript Code without any event:</em></strong>This is the first error any JavaScript developer is bound to make. Allow me to illustrate it with a real life example. Suppose, we need to alert the content inside a div with id &#8220;content&#8221;. The novice developer would write:
<pre lang="javascript">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Invalid JavaScript Code&lt;/title&gt;
    &lt;script type="text/javascript" language="javascript"&gt;
        var content=document.getElementById('content').innerHTML;
        alert(content);
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id="content"&gt;This is the sample content&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Needless to say, the above code will throw an error. The technical explanation of the error is as follows. As JavaScript is an interpreted scripting language, it would try to read the content on the line 6. However, at that moment, the HTML had not been rendered and hence JavaScript will find no div. Its solution is very simple and elementary. All you have to do is to call this code on some event, like onload , onclick etc.  Following is the correct way to do it:</p>
<pre lang="javascript">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Valid JavaScript Code&lt;/title&gt;
    &lt;script type="text/javascript" language="javascript"&gt;
        function init(){
            var content=document.getElementById('content').innerHTML;
            alert(content);
        }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body onload="init()"&gt;
&lt;div id="content"&gt;This is the sample content&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</li>
<li><strong><em>Reading string as array:</em></strong>Well, once I committed this mistake and spent over 2 days to find this issue from 102 lines of JavaScript. Suppose you need to read and display the 3rd  character of a string. any C or PHP developer is bound to write the code like this:
<pre lang="javascript">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Invalid JavaScript Code&lt;/title&gt;
    &lt;script type="text/javascript" language="javascript"&gt;
        function readString(){
            var str="JavaScript";
            alert(str[2]);
        }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;input type="button" onclick="readString();" /&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Quite interestingly, the above code if alert &#8220;v&#8221; in Firefox or Mozilla. On few Internet Explorers it will throw an error. The reason is that reading string as an array (str[2]) is not an cross browser compatible. The correct way code is as follows:</p>
<pre lang="javascript">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Valid JavaScript Code&lt;/title&gt;
    &lt;script type="text/javascript" language="javascript"&gt;
        function readString(){
            var str="JavaScript";
            alert(str.charAt(2));
        }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;input type="button" onclick="readString();" /&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</li>
<li><strong><em>Validating for an blank field in JavaScript:</em></strong>This is one of the most common bug your quality analyst or client would let you know. When you are validating a blank field (say username). Most of the JavaScript developers  would write the following code to validate it:
<pre lang="javascript">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Valid JavaScript Code&lt;/title&gt;
    &lt;script type="text/javascript" language="javascript"&gt;
        function validate(){
            var value=document.getElementById('uname').value;
            if(value.length&lt;1) {
                 alert("ERROR: Username cannot be left blank");
                 return false;
             }
        }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body onload="init()"&gt;
Username: &lt;input type="text" id="uname"&gt;
&lt;input type="button" onclick="validate()" /&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</li>
</ol>
<p>Although the above code may seems to work, but it fails as soon as you enter any invisible character like space, newline/enter or a tab. The check is that the length of the string entered should not be less than 1 (in this case). What the developer has failed to negotiate that three invisible characters like spaces would count 3 but would be invalid. The solution is simple. Trim (similar to one in PHP) the value before applying this check. Unfortunately, there is no inbuilt function to trim a string. However you can use it from my free library <a title="Click to view source of rochak.js" href="http://rochakchauhan.com/rochak.js" target="_blank">rochak.js</a> as used in the following example.</p>
<pre lang="javascript">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Valid JavaScript Code&lt;/title&gt;
    &lt;script type="text/javascript" language="javascript" src="http://rochakchauhan.com/rochak.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" language="javascript"&gt;
        function validate(){
            var value=document.getElementById('uname').value;
            value=rochak.trim(value);
            if(value.length&lt;1) {
                 alert("ERROR: Username cannot be left blank");
                 return false;
             }
        }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body onload="init()"&gt;
Username: &lt;input type="text" id="uname"&gt;
&lt;input type="button" onclick="validate()" /&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/09/25/most-common-javascript-mistakes/feed/</wfw:commentRss>
		<slash:comments>432</slash:comments>
		</item>
		<item>
		<title>How to clean an Infected PC</title>
		<link>http://rochakchauhan.com/blog/2008/09/04/how-to-clean-and-infected-pc/</link>
		<comments>http://rochakchauhan.com/blog/2008/09/04/how-to-clean-and-infected-pc/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 05:11:59 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Clean PC]]></category>
		<category><![CDATA[infected PC]]></category>
		<category><![CDATA[trogan]]></category>
		<category><![CDATA[virus]]></category>
		<category><![CDATA[worm]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/09/04/how-to-clean-and-infected-pc/</guid>
		<description><![CDATA[Define Infected PC: Well, my definition of an Infected computer is that it has some virus or worm or trojan or some spyware. There may be a case that it is infected with all of these&#8230;.god bless that user How do you know if you are infected? Although there is no hard and fast rules, &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/09/04/how-to-clean-and-infected-pc/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em><strong>Define Infected PC:</strong></em></p>
<p>Well, my definition of an Infected computer is that it has some virus or worm or trojan or some spyware. There may be a case that it is infected with all of these&#8230;.god bless that user <img src='http://rochakchauhan.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><em><strong>How do you know if you are infected?</strong></em></p>
<p>Although there is no hard and fast rules, but the most common symptoms of an infection are:</p>
<ol>
<li>Your PC get very slow overnight or in 2-3 days.</li>
<li>Your hard disk space magically get filled up.</li>
<li>The default homepage of your browser changes to some weird address.</li>
<li>You get Popups or alerts randomly.</li>
<li>You can NOT enable the option to &#8220;view hidden and system files&#8221;</li>
<li>When you click your Drive Icon or USB drive icon, you get a &#8220;Open With&#8221; dialog box.</li>
<li>You get some unknown and random Toolbar installed on your browser.</li>
</ol>
<p><em><strong>How to clean the PC?</strong></em></p>
<p>Now thats a million dollar question <img src='http://rochakchauhan.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I understand installing an Antivirus software may slow down your PC by a fraction, but trust me it is still very important before you go online. In fact a Antivirus alone is ineffective in todays Web 2.0 world. You need Antivirus, AntiSpyware and a basic firewall. I would advice you to use  <a title="AVG 8" href="http://free.avg.com/ww.download" target="_blank">AVG Free 8</a></p>
<p>However if you are already infected, chances are you will not be allowed to download and / or update any Antivirus software. But no worries, thanks to <a title="Combofix" href="http://www.bleepingcomputer.com/combofix/how-to-use-combofix" target="_blank">Combofix.</a> It is an amazing free tool to clean up your PC. Just run it and within 10 mins your PC would be clean as new. Once combofix has done its job, dont forget to install and update an Antivirus software (preferably AVG FREE <img src='http://rochakchauhan.com/blog/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> .</p>
<p>May the forces of AVG be with you <img src='http://rochakchauhan.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>PS: If you found this post helpful, you may want to try to &#8220;<a title="How to speed up your PC" href="http://rochakchauhan.com/blog/2008/09/30/how-to-speed-up-your-pc/" target="_self">How to speed up your PC</a>&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/09/04/how-to-clean-and-infected-pc/feed/</wfw:commentRss>
		<slash:comments>610</slash:comments>
		</item>
		<item>
		<title>Top Ten Security Vulnerabilities in PHP Code !</title>
		<link>http://rochakchauhan.com/blog/2008/07/13/top-ten-security-vulnerabilities-in-php-code/</link>
		<comments>http://rochakchauhan.com/blog/2008/07/13/top-ten-security-vulnerabilities-in-php-code/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 08:29:57 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Security Vulnerabilities]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/07/13/top-ten-security-vulnerabilities-in-php-code/</guid>
		<description><![CDATA[1. Unvalidated Parameters Most importantly, turn off register_globals. This configuration setting defaults to off in PHP 4.2.0 and later. Access values from URLs, forms, and cookies through the superglobal arrays $_GET, $_POST, and $_COOKIE. Before you use values from the superglobal arrays, validate them to make sure they don&#8217;t contain unexpected input. If you know &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/07/13/top-ten-security-vulnerabilities-in-php-code/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<h2><span class="byline"></span> 1. Unvalidated Parameters</h2>
<p>Most importantly, turn off <code>register_globals</code>. This configuration setting defaults to off in PHP 4.2.0 and later. Access values from URLs, forms, and cookies through the superglobal arrays <code>$_GET</code>, <code>$_POST</code>, and <code>$_COOKIE</code>.</p>
<p>Before you use values from the superglobal arrays, validate them to make sure they don&#8217;t contain unexpected input. If you know what type of value you are expecting, make sure what you&#8217;ve got conforms to an expected format. For example, if you&#8217;re expecting a US ZIP Code, make sure your value is either five digits or five digits, a hyphen, and four more digits (ZIP+4). Often, regular expressions are the easiest way to validate data:</p>
<pre>if (preg_match('/^\d{5}(-\d{4})?$/',$_GET['zip'])) {
    $zip = $_GET['zip'];
} else {
    die('Invalid ZIP Code format.');
}</pre>
<p>If you&#8217;re expecting to receive data in a cookie or a hidden form field that you&#8217;ve previously sent to a client, make sure it hasn&#8217;t been tampered with by sending a hash of the data and a secret word along with the data. Put the hash in a hidden form field (or in the cookie) along with the data. When you receive the data and the hash, re-hash the data and make sure the new hash matches the old one:</p>
<pre>// sending the cookie
$secret_word = 'gargamel';
$id = 123745323;
$hash = md5($secret_word.$id);
setcookie('id',$id.'-'.$hash);

// receiving and verifying the cookie
list($cookie_id,$cookie_hash) = explode('-',$_COOKIE['id']);
if (md5($secret_word.$cookie_id) == $cookie_hash) {
    $id = $cookie_id;
} else {
    die('Invalid cookie.');
}</pre>
<p>If a user has changed the ID value in the cookie, the hashes won&#8217;t match. The success of this method obviously depends on keeping <code>$secret_word</code> secret, so put it in a file that can&#8217;t be read by just anybody and change it periodically. (But remember, when you change it, old hashes that might be lying around in cookies will no longer be valid.)</p>
<p><strong>See Also:</strong></p>
<ul>
<li> PHP Manual: Using Register Globals</li>
<li>PHP Cookbook: Recipe 9.7 (&#8220;Securing PHP&#8217;s Form Processing&#8221;), Recipe 14.3 (&#8220;Verifying Data with Hashes&#8221;)</li>
</ul>
<h2>2. Broken Access Control</h2>
<p>Instead of rolling your own access control solution, use PEAR modules. <code>Auth</code> does cookie-based authentication for you and <code>Auth_HTTP</code> does browser-based authentication.</p>
<p><strong>See Also:</strong></p>
<ul>
<li>PEAR Packages: <a href="http://pear.php.net/package-info.php?package=Auth">Auth</a>, <a href="http://pear.php.net/package-info.php?package=Auth_HTTP">Auth_HTTP</a>.</li>
</ul>
<h2>3. Broken Account and Session Management</h2>
<p>Use PHP&#8217;s built-in session management functions for secure, standardized session management. However, be careful how your server is configured to store session information. For example, if session contents are stored as world-readable files in /tmp, then any user that logs into the server can see the contents of all the sessions. Store the sessions in a database or in a part of the file system that only trusted users can access.</p>
<p>To prevent network sniffers from scooping up session IDs, session-specific traffic should be sent over SSL. You don&#8217;t need to do anything special to PHP when you&#8217;re using an SSL connection, but you do need to specially configure your webserver.</p>
<p><strong>See Also:</strong></p>
<ul>
<li>PHP Manual: <a href="http://www.php.net/session">Session handling functions</a></li>
<li>PHP Cookbook: Recipe 8.5 (&#8220;Using Session Tracking&#8221;), Recipe 8.6 (&#8220;Storing Sessions in a Database&#8221;)</li>
</ul>
<h2>4. Cross-Site Scripting (XSS) Flaws</h2>
<p>Never display any information coming from outside your program without filtering it first. Filter variables before including them in hidden form fields, in query strings, or just plain page output.</p>
<p>PHP gives you plenty of tools to filter untrusted data:</p>
<ul>
<li><code>htmlspecialchars()</code> turns <code>&amp; &gt; " &lt;</code> into their HTML-entity equivalents and can also convert 	single quotes by passing <code>ENT_QUOTES</code> as a second argument.</li>
<li><code>strtr()</code> filters any characters you&#8217;d like. Pass <code>strtr()</code> an array of characters and their replacements. To change <code>(</code> and <code>)</code> into their entity equivalents, which is recommended to prevent XSS attacks, do:<br />
<code> $safer = strtr($untrusted, array('(' =&gt; '(', ')' =&gt; ')'));</code></li>
<li><code>strip_tags()</code> removes HTML and PHP tags from a string.</li>
<li><code>utf8_decode()</code> converts the ISO-8859-1 characters in a string encoded with the Unicode UTF-8 encoding to single-byte ASCII characters. Sometimes cross-site scripting attackers attempt to hide their attacks in Unicode encoding. You can use <code>utf8_decode()</code> to peel off that encoding.</li>
</ul>
<p><strong>See Also:</strong></p>
<ul>
<li>PHP Manual: <a href="http://www.php.net/htmlspecialchars">htmlspecialchars()</a>, <a href="http://www.php.net/strtr">strtr()</a>, <a href="http://www.php.net/strip-tags">strip_tags()</a>, <a href="http://www.php.net/utf8-decode">utf8_decode()</a></li>
<li>PHP Cookbook: Recipe 8.8 (&#8220;Building a GET Query String&#8221;), Recipe 9.8 (&#8220;Escaping Control Characters from User Data&#8221;)</li>
</ul>
<h2>5. Buffer Overflows</h2>
<p>You can&#8217;t allocate memory at runtime in PHP and their are no pointers like in C so your PHP code, however sloppy it may be, won&#8217;t have any buffer overflows. What you do have to watch out for, however, are buffer overflows in PHP itself (and its extensions.) Subscribe to the php-announce mailing list to keep abreast of patches and new releases.</p>
<p><strong>See Also:</strong></p>
<ul>
<li> PHP Mailing Lists: <a href="http://www.php.net/mailing-lists.php">http://www.php.net/mailing-lists.php</a></li>
</ul>
<h2>6. Command Injection Flaws</h2>
<p>Cross-site scripting flaws happen when you display unfiltered, unescaped malicious content to a user&#8217;s browser. Command injection flaws happen when you pass unfiltered, unescaped malicious commands to an external process or database. To prevent command injection flaws, in addition to validating input, always escape user input before passing it to an external process or database.</p>
<p>If you&#8217;re passing user input to a shell (via a command like <code>exec()</code>, <code>system()</code>, or the backtick operator), first, ask yourself if you really need to. Most file operations can be performed with native PHP functions. If you absolutely, positively need to run an external program whose name or arguments come from untrusted input, escape program names with <code>escapeshellcmd()</code> and arguments with <code>escapeshellarg()</code>.</p>
<p>Before executing an external program or opening an external file, you should also canonicalize its pathname with <code>realpath()</code>. This expands all symbolic links, translates <code>.</code> (current directory) <code>..</code> (parent directory), and removes duplicate directory separators. Once a pathname is canonicalized you can test it to make sure it meets certain criteria, like being beneath the web server document root or in a user&#8217;s home directory.</p>
<p>If you&#8217;re passing user input to a SQL query, escape the input with <code>addslashes()</code> before putting it into the query. If you&#8217;re using MySQL, escape strings with <code>mysql_real_escape_string()</code> (or <code>mysql_escape_string()</code> for PHP versions before 4.3.0). If you&#8217;re using the PEAR DB database abstraction layer, you can use the DB::quote() method or use a query placeholder like <code>?</code>, which automatically escapes the value that replaces the placeholder.</p>
<p><strong>See Also:</strong></p>
<ul>
<li> PHP Manual: <a href="http://www.php.net/escapeshellcmd">escapeshellcmd()</a>, <a href="http://www.php.net/escapeshellarg">escapeshellarg()</a>, <a href="http://www.php.net/realpath">realpath()</a>, <a href="http://www.php.net/addslashes">addslashes()</a>, <a href="http://www.php.net/mysql_real_escape_string">mysql_real_escape_string()</a>, <a href="http://www.php.net/mysql_escape_string">mysql_escape_string()</a></li>
<li> PEAR Package: <a href="http://pear.php.net/package-info.php?package=DB">DB</a>, DB Documentation</li>
<li> PHP Cookbook: Recipe 18.20 (&#8220;Escaping Shell Metacharacters&#8221;), Recipe 10.9 (&#8220;Escaping Quotes&#8221;)</li>
</ul>
<h2>7. Error Handling Problems</h2>
<p>If users (and attackers) can see the raw error messages returned from PHP, your database, or external programs, they can make educated guesses about how your system is organized and what software you use. These educated guesses make it easier for attackers to break into your system. Error messages shouldn&#8217;t contain any descriptive system information. Tell PHP to put error messages in your server&#8217;s error log instead of displaying them to a user with these configuration directives:</p>
<pre>log_errors = On
display_errors = Off</pre>
<p><strong>See Also:</strong></p>
<ul>
<li> PHP Manual: <a href="http://www.php.net/errorfunc">Error Handling and Logging Functions</a></li>
<li> PHP Cookbook: Recipe 8.14 (&#8220;Hiding Error Messages from Users&#8221;)</li>
</ul>
<h2>8. Insecure Use of Cryptography</h2>
<p>The <code>mcrypt</code> extension provides a standardized interface to many popular cryptographic algorithms. Use <code>mcrypt</code> instead of rolling your own encryption scheme. Also, be careful about where (if anywhere) you store encryption keys. The strongest algorithm in the world is pointless if an attacker can easily obtain a key for decryption. If you need to store keys at all, store them apart from encrypted data. Better yet, don&#8217;t store the keys and prompt users to enter them when something needs to be decrypted. (Of course, if you&#8217;re prompting a user over the web for sensitive information like an encryption key, that prompt and the user&#8217;s reply should be passed over SSL.)</p>
<p><strong>See Also:</strong></p>
<ul>
<li>PHP Manual: <a href="http://www.php.net/mcrypt">Mcrypt Encryption Functions</a></li>
<li>PHP Cookbook: Recipe 14.7 (&#8220;Encrypting and Decrypting Data&#8221;)</li>
</ul>
<h2>9. Remote Administration Flaws</h2>
<p>When possible, run remote administration tools over an SSL connection to prevent sniffing of passwords and content. If you&#8217;ve installed third-party software that has a remote administration component, change the default administrative user names and passwords. Change the default administrative URL as well, if possible. Running administrative tools on a different web server than the public web server that the administrative tool administrates can be a good idea as well.</p>
<h2>10. Web and Application Server Misconfiguration</h2>
<p>Keep on top of PHP patches and security problems by subscribing to the php-announce mailing list. Stay away from the automatic PHP source display handler (<code>AddType application/x-httpd-php-source .phps</code>), since it lets attackers look at your code. Of the two sample <code>php.ini</code> files distributed with PHP ( <code>php.ini-dist</code> and <code>php.ini-recommended</code>), use <code>php.ini-recommended</code> as a base for your site configuration.</p>
<p><em><strong>Read the Original Post at:</strong></em> <a href="http://www.sklar.com/page/article/owasp-top-ten" title="Original Post" target="_blank">http://www.sklar.com/page/article/owasp-top-ten</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/07/13/top-ten-security-vulnerabilities-in-php-code/feed/</wfw:commentRss>
		<slash:comments>373</slash:comments>
		</item>
		<item>
		<title>Sync your Google and Outlook calendars</title>
		<link>http://rochakchauhan.com/blog/2008/03/11/sync-your-google-and-outlook-calendars/</link>
		<comments>http://rochakchauhan.com/blog/2008/03/11/sync-your-google-and-outlook-calendars/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 07:06:12 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Computer Usage]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Google Calendar]]></category>
		<category><![CDATA[Outlook Calendar]]></category>
		<category><![CDATA[Sync Calendars]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/03/11/sync-your-google-and-outlook-calendars/</guid>
		<description><![CDATA[Google Calendar Sync: Getting Started Google Calendar Sync allows you to sync events between Google Calendar and Microsoft Outlook Calendar. You&#8217;ll be able to determine the direction of information flow, as well as the sync frequency. Staying on top of your Google Calendar and Microsoft Outlook Calendar events has never been easier! Keep in mind &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/03/11/sync-your-google-and-outlook-calendars/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<h2 class="ans_title"> Google Calendar Sync: Getting Started</h2>
<p>Google Calendar Sync allows you to sync events between Google Calendar and Microsoft Outlook Calendar. You&#8217;ll be able to determine the direction of information flow, as well as the sync frequency. Staying on top of your Google Calendar and Microsoft Outlook Calendar events has never been easier!</p>
<p>Keep in mind that it&#8217;s not possible to sync events on secondary calendars at this time. Google Calendar Sync will only sync events from your primary Google Calendar and your default Microsoft Outlook calendar.</p>
<h3>Get started</h3>
<p>To begin syncing, follow the steps below:</p>
<ol>
<li>To download Google Calendar Sync, visit <a href="http://dl.google.com/googlecalendarsync/GoogleCalendarSync_Installer.exe">http://dl.google.com/googlecalendarsync/GoogleCalendarSync_Installer.exe</a></li>
<li>Once a dialog box appears, click &#8220;Save File.&#8221; The download should open automatically. If it doesn&#8217;t, manually open the download from your browser&#8217;s download window.</li>
<li>Click &#8220;OK&#8221; to confirm that you&#8217;re aware this is an executable file.</li>
<li>Read through the Google Calendar Sync Terms of Service, and click &#8220;I Agree.&#8221;</li>
<li>Continue to follow through the Installation Options and click &#8220;Install&#8221; to finish the set-up process.</li>
</ol>
<p>Once Google Calendar Sync is installed on your computer, the Google Calendar Sync Settings window will appear:<br />
<img src="http://www.google.com/help/hc/images/calendar_89955a_en.gif.png" alt="text" /><br />
In the Settings window, enter your email address and password and select the Sync Option you prefer. For more information on each Sync Option, please visit <a href="http://www.google.com/support/calendar/bin/answer.py?answer=89960">Google Calendar Sync: Options</a></p>
<p>You&#8217;ll also be able to set the time interval for syncing to occur. Please keep in mind that 10 minutes is the minimum time interval allowed.</p>
<p>After the initial set-up, you can access the Google Calendar Sync Settings window again by double-clicking on the calendar icon in your Windows System Tray.</p>
<h3>Icon Status</h3>
<p>To access the Google Calendar Sync Settings window, just right-click on the calendar icon in your Windows System Tray and select &#8220;Options&#8221;.<br />
<img src="http://www.google.com/help/hc/images/calendar_89955b_en.gif" alt="text" /><br />
When your events are actively syncing between Google Calendar and Microsoft Outlook Calendar, you&#8217;ll see arrows in the Google Calendar Sync icon:<br />
<img src="http://www.google.com/help/hc/images/calendar_89955c_en.gif.png" alt="text" /><br />
When events aren&#8217;t actively syncing, your calendar icon will look like this:<br />
<img src="http://www.google.com/help/hc/images/calendar_89955d_en.gif.png" alt="text" /></p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/03/11/sync-your-google-and-outlook-calendars/feed/</wfw:commentRss>
		<slash:comments>431</slash:comments>
		</item>
		<item>
		<title>Using MVC in PHP Applications.</title>
		<link>http://rochakchauhan.com/blog/2008/02/23/using-mvc-in-php-applications/</link>
		<comments>http://rochakchauhan.com/blog/2008/02/23/using-mvc-in-php-applications/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 06:57:05 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/02/23/using-mvc-in-php-applications/</guid>
		<description><![CDATA[The Model-View-Controller (MVC) architecture provides a useful three-tier pattern for building software, as MVC patterns decouple the graphical user interface (GUI) from the application logic. That comes in useful when it comes to changing an application after it has been deployed. Separation of the views from the data means modifications made in the views do &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/02/23/using-mvc-in-php-applications/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The Model-View-Controller <a href="http://ootips.org/mvc-pattern.html" target="_blank">(MVC)</a>  architecture provides a useful three-tier pattern for building software, as MVC patterns decouple the graphical user interface (GUI) from the application logic.</p>
<p>That comes in useful when it comes to changing an application after it has been deployed. Separation of the views from the data means modifications made in the views do not affect the model and modifications made to the model to not effect the graphical user interface, simplifying maintenance. Also, an application may be expanded to add views and controllers that talk to a model without actually making any changes to the model itself.</p>
<p id="MidArticleAd"><script type="text/javascript">     document.write(\'\x3Cscript src="http://ad.uk.doubleclick.net/adj/reg.developer.4159/lifecycle;\'+RegExCats+GetVCs()+\'chl=;pid=\'+RegId+\';\'+RegKW+\'maid=\'+maid+\';test=\'+test+\';pf=\'+RegPF+\';dcove=d;sz=336x280;tile=3;ord=\' + rand + \'?" type="text/javascript">\x3C\/script>\');</script><script src="http://ad.uk.doubleclick.net/adj/reg.developer.4159/lifecycle;vc=print.print;vc=dev.lifecycle;chl=;pid=0;maid=;test=;pf=1;dcove=d;sz=336x280;tile=3;ord=16542149977661?" type="text/javascript"></script><noscript></noscript></p>
<p>Unfortunately for web developers, one of the features lacking in PHP until recently has been support for the MVC architecture. That has meant the MVC pattern has had to be implemented externally.</p>
<p>Some PHP frameworks have now added support for the MVC pattern, most notably the Zend Framework &#8211; one of the leading open-source PHP frameworks. Zend simplifies the task of developing secure, reliable web-based applications and web services. Zend provides an extensible code base, a flexible architecture and does not require any configuration files.</p>
<p>In this article we shall connect Zend to a database from Oracle, a company that&#8217;s been working closely to optimize its software with Zend.</p>
<h3>Fire up Zend</h3>
<p>The Zend framework requires at least PHP 5.1.4. It&#8217;s recommended to install PHP 5.2.2 or later because of the security and performance improvements in the newer version of PHP. Download the Zend Framework zip file <a href="http://framework.zend.com/download">from here</a> and &#8211; if you don&#8217;t already have it &#8211; download and install Apache 2.2.3, making sure it&#8217;s configured with PHP. Then, add the following <code>include_path</code> directive to <code>php.ini</code> configuration file:</p>
<pre>include_path=".;C:\ZendFramework\ZendFramework-1.0.1\library"</pre>
<p>Enable the PHP database extension for Oracle database in <code>php.ini</code>.</p>
<pre>extension=php_oci8.dll</pre>
<p>Restart Apache HTTP Server. Install the Oracle database including the sample schemas and create a table <code>Catalog</code> using SQL script <code>catalog.sql</code>.</p>
<h3>Create an MVC application</h3>
<p>Now it&#8217;s time to create a Create Read Update Delete (CRUD) application using Zend&#8217;s MVC architecture that&#8217;ll let us build, read, update, and delete an Oracle database table row.</p>
<p>In the MVC architecture the model represents the entities/class objects, the controller implements the business logic and integrates the model with the view, and the view represents the presentation layer or the user interface.</p>
<p>The MVC architecture in Zend Framework is implemented by the <code>Zend_Controller</code> component. The <code>Zend_Controller_Front</code> class provides a front controller for the MVC architecture. The front controller intercepts all requests and dispatches the requests to action controllers based on the request URL. The format of the request URL is <code>http://localhost/controller/action</code>. If no controller is specified the <code>index</code> controller and the <code>index</code> action are invoked. An action controller class extends the <code>Zend_Controller_Action</code> class. An action controller class is named with the notation <code>&lt;ControllerName&gt;Controller</code>. For example, the action controller class for the &#8220;index&#8221; controller is <code>IndexController</code>.</p>
<hr class="PageBreak" />Create a &#8220;controllers&#8221; directory and a &#8220;views&#8221; directory in the Apache web server document root <code>htdocs</code> by default. We shall create the view scripts in the &#8220;views&#8221; directory and controllers in the &#8220;controllers&#8221; directory. Create action controller, &#8220;database&#8221;, for the business logic of the MVC application. Create a <code>DatabaseController</code> class that extends the <code>Zend_Controller_Action</code> class and add action functions <code>insertAction</code>, <code>selectAction</code>, <code>updateAction</code>, and <code>deleteAction</code> to the class.The controller actions will be invoked from view scripts, which provide a user interface to specify the table row to be added, selected, updated and deleted. Create the view scripts <code>insertView.php</code>, <code>selectView.php</code>, <code>updateView.php</code>, and <code>deleteView.php</code> in the &#8220;views&#8221; directory. The view scripts and other resource files are available in a zipped resources file <a href="http://regmedia.co.uk/2008/02/21/php_zend_resources_zip.zip">here</a></p>
<h4>Add a row</h4>
<p>First, we shall add a row to the <code>Catalog</code> table. In the <code>insertView.php</code> add a form with input fields for the table row to be added. The &#8220;action&#8221; attribute of the <code>&lt;form&gt;</code> element specifies &#8220;database/insert&#8221;, which corresponds to the &#8220;insert&#8221; action of the &#8220;database&#8221; controller. In the <code>DatabaseController</code> <code>insertAction</code> function create a <code>Zend_Db</code> adapter, which represents a connection with Oracle database, using the <code>Zend_Db</code> factory.</p>
<pre>$params = array ('host'=&gt;'localhost','username'=&gt;'OE','password'=&gt;'pw','dbname'=&gt;'orcl'); $db=Zend_Db::factory('Oracle', $params);</pre>
<p>The first argument specifies the base name for the adapter class &#8211; &#8220;Oracle&#8221; for the Oracle database. The second argument specifies the adapter parameters. Retrieve the input fields specified in the <code>insertView.php</code> using <code>$_POST['field']</code> and create an associative array, <code>$row</code>, for the columns that constitute a row in the database table. Specify the database table to be updated and insert the new row using the <code>insert()</code> method of the <code>Zend_Db</code> adapter class.</p>
<pre>$table = 'Catalog'; $rowsAffected = $db-&gt;insert($table, $row);</pre>
<p>The first argument of the <code>insert()</code> method is the database table and the second argument is the associative array that maps column names to values. Invoke the <code>insertView.php</code> with URL <code>http://localhost/views/insertView.php</code>. To add a row specify the column values and click on create.</p>
<p class="CaptionedImage Center Float"><img src="http://regmedia.co.uk/2008/02/21/adding_a_row.jpg" alt="adding a row" title="adding a row" height="255" width="450" />Adding a row</p>
<h4>Retrieve a row</h4>
<p>Next, retrieve a row from the catalog table using the Zend Framework. Create a <code>Zend_Db_Select</code> object from the <code>Zend_Db</code> adapter object using the <code>select()</code> method.</p>
<pre>$select = $db-&gt;select();</pre>
<p>The <code>Zend_Db_Select</code> object is used to construct a SQL <code>SELECT</code> statement. Specify the <code>FROM</code> clause using the <code>from()</code> method and the <code>WHERE</code> clause using the <code>where()</code> method.</p>
<pre>$select-&gt;from('Catalog', '*'); $select-&gt;where('ID = ?', $_POST['id']);</pre>
<p>Create the SQL query string from the <code>Zend_Db_Select</code> object using the <code>_toString()</code> method. Run the SQL query using the <code>fetchAll()</code> method and query results will be returned as a row set.</p>
<pre>$sql = $select-&gt;__toString(); $rowset = $db-&gt;fetchAll($sql);</pre>
<p>Create a <code>Zend_View</code> object to render a view script and specify the directory containing the view scripts. The <code>Zend_View</code> class represents the &#8220;view&#8221; component of the model-view-controller pattern.</p>
<pre>$view = new Zend_View(); $view-&gt;setScriptPath('views');</pre>
<hr class="PageBreak" />Assign the row column values to the <code>Zend_View</code> instance. The variables assigned to the <code>Zend_View</code> object become the properties of the <code>Zend_View</code> object.</p>
<pre>$view-&gt;id = $_POST['id']; $view-&gt;journal = $rowset[0]["JOURNAL"]; $view-&gt;publisher = $rowset[0]["PUBLISHER"]; $view-&gt;edition = $rowset[0]["EDITION"]; $view-&gt;title = $rowset[0]["TITLE"]; $view-&gt;author = $rowset[0]["AUTHOR"];</pre>
<p>Create a view script, <code>resultView.php</code>, associated with the <code>Zend_View</code> object. The view script will run in the scope of the <code>Zend_View</code> object. References to <code>$this</code> in the view script are references to the <code>Zend_View</code> object. Create a table header and add values to the table using the <code>Zend_View</code> properties assigned in the action controller. In the <code>selectAction</code> function render the <code>resultView.php</code> script.</p>
<pre>echo $view-&gt;render('resultView.php');</pre>
<p>Invoke the <code>selectView.php</code> view script with the URL <code>http://localhost/views/selectView.php</code>. Specify the catalog ID for the row that is to be retrieved and click select.</p>
<p class="CaptionedImage Center Float"><img src="http://regmedia.co.uk/2008/02/21/select_database_table_row.jpg" alt="Selecting a database table row" title="Selecting a database table row" height="255" width="450" />Selecting a database table row</p>
<p>The row corresponding to the specified catalog ID will be retrieved and the results displayed.</p>
<h4>Update a Row</h4>
<p>Next, update a catalog table row using the Zend Framework. Create an associative array, <code>$data</code>, of column names and values for the row to be updated. Create a SQL expression specifying the <code>WHERE</code> clause for the ID of the row to be updated.</p>
<pre>$where[] = "ID ="."'".$_POST['id']."'";</pre>
<p>Update the database table using the <code>update()</code> method.</p>
<pre>$n = $db-&gt;update('Catalog', $data, $where);</pre>
<p>Invoke the <code>updateView.php</code> script with URL <code>http://localhost/views/updateView.php</code>. Specify the catalog ID of the row to be updated and the column values to be updated and click on update.</p>
<p class="CaptionedImage Center Float"><img src="http://regmedia.co.uk/2008/02/21/updating_database_table.jpg" alt="Updating database table" title="Updating database table" height="255" width="450" />Updating database table</p>
<p>A table row may be deleted using the <code>delete()</code> function.</p>
<p>MVC has a proven track record in simplifying the development and on-going maintenance of applications. Using Zend and the methodology I have outlined, you can now take advantage of MVC to simplify your work with PHP applications</p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/02/23/using-mvc-in-php-applications/feed/</wfw:commentRss>
		<slash:comments>282</slash:comments>
		</item>
		<item>
		<title>Tips to migrate from HTML to xHTML</title>
		<link>http://rochakchauhan.com/blog/2008/02/20/tips-to-migrate-from-html-to-xhtml/</link>
		<comments>http://rochakchauhan.com/blog/2008/02/20/tips-to-migrate-from-html-to-xhtml/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 14:46:18 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[xHTML]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/02/20/tips-to-migrate-from-html-to-xhtml/</guid>
		<description><![CDATA[5 simple steps to migrate from HTML to XHTML . Open with the proper DOCTYPE &#38; Namespace &#60;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd “&#62; Write all tags in lowercase &#60;title&#62;XHTML Rules&#60;/title&#62; Quote all attribute values src=”xyz.png” and not src=xyz.png Close all tags &#60;p&#62;Some Text&#60;/p&#62; Close “empty” tags, too &#60;img src=”xyz.png” /&#62;]]></description>
			<content:encoded><![CDATA[<p>5 simple steps to migrate from HTML to XHTML .</p>
<ol>
<li>Open with the proper DOCTYPE &amp; Namespace<br />
<em><strong><font color="#000080">&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd “&gt;</font></strong></em></li>
<li>Write all tags in lowercase<br />
<em><font color="#000080"><strong>&lt;title&gt;XHTML Rules&lt;/title&gt;</strong></font></em></li>
<li>Quote all attribute values<br />
<em><font color="#000080"><strong>src=”xyz.png” and not src=xyz.png</strong></font></em></li>
<li>Close all tags<br />
<em><font color="#000080"><strong>&lt;p&gt;Some Text&lt;/p&gt;</strong></font></em></li>
<li>Close “empty” tags, too<br />
<em><strong><font color="#000080">&lt;img src=”xyz.png” /&gt;</font></strong></em></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/02/20/tips-to-migrate-from-html-to-xhtml/feed/</wfw:commentRss>
		<slash:comments>279</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
