<?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>Making Life Simple &#187; php</title>
	<atom:link href="http://www.lalitmehta.com/home/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lalitmehta.com/home</link>
	<description></description>
	<lastBuildDate>Tue, 09 Feb 2010 21:36:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Resize image in PHP</title>
		<link>http://www.lalitmehta.com/home/2008/07/27/resize-image-in-php/</link>
		<comments>http://www.lalitmehta.com/home/2008/07/27/resize-image-in-php/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 20:23:04 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/2008/07/27/resize-image-in-php/</guid>
		<description><![CDATA[Uploaded images from user can be of any size.  If you need to use these images, they need to be resized upon upload. Here is a helper class to manage resizing of the images. Let me know if you find any bugs.]]></description>
			<content:encoded><![CDATA[<p>Uploaded images from user can be of any size.  If you need to use these images, they need to be resized upon upload. Here is a <a href="http://www.lalitmehta.com/home/wp-content/uploads/2008/07/cls_image.txt" title="PHP Image Resize" target="_blank">helper class</a> to manage resizing of the images.</p>
<p>Let me know if you find any bugs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2008/07/27/resize-image-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable register_global through .htaccess</title>
		<link>http://www.lalitmehta.com/home/2008/06/17/enable-register_global-through-htaccess/</link>
		<comments>http://www.lalitmehta.com/home/2008/06/17/enable-register_global-through-htaccess/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 04:36:10 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/2008/06/17/enable-register_global-through-htaccess/</guid>
		<description><![CDATA[I would not recommend to enable register_globals, but if you need to enable the register_globals for a particular web folder, you can edit the .htaccess file and append the following to it php_flag register_globals on Restart apache and you are on your way.]]></description>
			<content:encoded><![CDATA[<p>I would not recommend to enable register_globals, but if you need to enable the register_globals for a particular web folder, you can edit the .htaccess file and append the following to it</p>
<p><code>php_flag register_globals on</code></p>
<p>Restart apache and you are on your way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2008/06/17/enable-register_global-through-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPImpact: 30 useful PHP classes</title>
		<link>http://www.lalitmehta.com/home/2008/05/30/phpimpact-30-useful-php-classes/</link>
		<comments>http://www.lalitmehta.com/home/2008/05/30/phpimpact-30-useful-php-classes/#comments</comments>
		<pubDate>Sat, 31 May 2008 05:47:56 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/2008/05/30/phpimpact-30-useful-php-classes/</guid>
		<description><![CDATA[PHPImpact has posted 30 useful PHP classes here. Which ones do you use? I have used the following: Propel phpDocumentor Securimage Smarty Still a lot more interesting ones which I haven&#8217;t tried.]]></description>
			<content:encoded><![CDATA[<p>PHPImpact has posted 30 useful PHP classes <a href="http://phpimpact.wordpress.com/2008/05/29/30-useful-php-classes-and-components/" title="30 useful PHP classes" target="_blank">here.</a></p>
<p>Which ones do you use? I have used the following:</p>
<ul>
<li><a href="http://propel.phpdb.org/trac/" target="_blank">Propel</a></li>
<li><a href="http://phpdoc.org/" target="_blank">phpDocumentor</a></li>
<li><a href="http://www.phpcaptcha.org/" target="_blank">Securimage</a></li>
<li><a href="http://www.smarty.net/">Smarty</a></li>
</ul>
<p>Still a lot more interesting ones which I haven&#8217;t tried.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2008/05/30/phpimpact-30-useful-php-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP single quotes Vs double quotes</title>
		<link>http://www.lalitmehta.com/home/2008/05/27/php-single-quotes-vs-double-quotes/</link>
		<comments>http://www.lalitmehta.com/home/2008/05/27/php-single-quotes-vs-double-quotes/#comments</comments>
		<pubDate>Wed, 28 May 2008 01:04:21 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/2008/05/27/php-single-quotes-vs-double-quotes/</guid>
		<description><![CDATA[Any time you put something in &#8220;double&#8221; quotes, you are asking PHP interpreter to check that content for a variable. So even though the line do not contain variables within the double quotes, PHP will waste precious computing time scanning them anyway. $sql = 'select * from employee'; will be much faster than $sql = [...]]]></description>
			<content:encoded><![CDATA[<p>Any time you put something in &#8220;double&#8221; quotes, you are asking PHP interpreter to check that content for a variable. So even though the line do not contain variables within the double quotes, PHP will waste precious computing time scanning them anyway.</p>
<p><code>$sql = 'select * from employee';</code></p>
<p>will be much faster than</p>
<p><code>$sql = "select * from employee";</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2008/05/27/php-single-quotes-vs-double-quotes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mysql_insert_id() returns NULL or 0</title>
		<link>http://www.lalitmehta.com/home/2008/02/29/mysql_insert_id-returns-null-or-0/</link>
		<comments>http://www.lalitmehta.com/home/2008/02/29/mysql_insert_id-returns-null-or-0/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 22:28:21 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/2008/02/29/mysql_insert_id-returns-null-or-0/</guid>
		<description><![CDATA[If you have multiple mysql connections (i.e. mysql_connect() or mysqli_connect()) on the page you will need to specify the the connection you are using when calling this function. example: mysql_insert_id($MY_CONN);]]></description>
			<content:encoded><![CDATA[<p>If you have multiple mysql connections (i.e. mysql_connect() or mysqli_connect()) on the page you will need to specify the the connection you are using when calling this function.</p>
<p>example:</p>
<p><code>mysql_insert_id($MY_CONN);</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2008/02/29/mysql_insert_id-returns-null-or-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Downloading a page in PHP</title>
		<link>http://www.lalitmehta.com/home/2007/08/13/downloading-a-page-in-php/</link>
		<comments>http://www.lalitmehta.com/home/2007/08/13/downloading-a-page-in-php/#comments</comments>
		<pubDate>Tue, 14 Aug 2007 00:13:09 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/2007/08/13/downloading-a-page-in-php/</guid>
		<description><![CDATA[If you ever need to download a HTTP/FTP or any page, try not to use fopen() and fread() functions. They work but will take enormous amounts of time as compared to curl functions. Try doing as follows: To GET a page using a url &#60;? $url=&#8221;http://any.url&#8221;; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever need to download a HTTP/FTP or any page, try not to use fopen() and fread() functions. They work but will take enormous amounts of time as compared to curl functions. Try doing as follows:</p>
<p>To GET a page using a url<br />
&lt;?<br />
$url=&#8221;http://any.url&#8221;;<br />
$ch = curl_init();<br />
curl_setopt($ch, CURLOPT_URL, $url);<br />
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);<br />
$store = curl_exec ($ch);<br />
$xml = curl_exec ($ch);<br />
curl_close ($ch);<br />
?&gt;<br />
To POST to a page using values and fields:<br />
&lt;?<br />
$url=&#8221;http://any.url&#8221;;<br />
$ch = curl_init();<br />
curl_setopt($ch, CURLOPT_URL, $url);<br />
curl_setopt ($ch, CURLOPT_POST, 1);<br />
curl_setopt ($ch, CURLOPT_POSTFIELDS, &#8220;fieldname=fieldvalue&amp;fieldname=fieldvalue&amp;&#8221;);<br />
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);<br />
$store = curl_exec ($ch);<br />
$content = curl_exec ($ch); # This returns HTML<br />
curl_close ($ch);<br />
?&gt;</p>
<p>For more information, check the <a href="http://us2.php.net/curl" title="curl" target="_blank">curl</a> function on <a href="http://us2.php.net" title="Official PHP website" target="_blank">PHP</a> website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2007/08/13/downloading-a-page-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Data Objects</title>
		<link>http://www.lalitmehta.com/home/2007/08/08/php-data-objects/</link>
		<comments>http://www.lalitmehta.com/home/2007/08/08/php-data-objects/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 02:04:38 +0000</pubDate>
		<dc:creator>lalit</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.lalitmehta.com/home/?p=24</guid>
		<description><![CDATA[I was looking for a quick reference/tutorial to implement Data Objects with PHP, very similar to what exists in Java. Found a nice explanation at PHP Data Object]]></description>
			<content:encoded><![CDATA[<p>I was looking for a quick reference/tutorial to implement Data Objects with PHP,  very similar to what exists in Java. Found a nice explanation at <a href="http://www.lalitmehta.com/home/wp-content/uploads/2007/08/php-dao.html" title="PHP Data Objects" target="_blank">PHP Data Object </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lalitmehta.com/home/2007/08/08/php-data-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
