<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" 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/" > <channel><title>Comments on: 15 very useful PHP code snippets for PHP developers</title> <atom:link href="http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html/feed" rel="self" type="application/rss+xml" /><link>http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html</link> <description>Tutorials, Java, J2EE, Struts, AJAX, JavaScript, CSS, Web 2.0, MySQL, Articles</description> <lastBuildDate>Wed, 08 Feb 2012 10:36:26 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: tendai</title><link>http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html/comment-page-1#comment-25744</link> <dc:creator>tendai</dc:creator> <pubDate>Tue, 31 Jan 2012 12:26:54 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1246#comment-25744</guid> <description>Useful tools indeed. thanks!</description> <content:encoded><![CDATA[<p>Useful tools indeed. thanks!</p> ]]></content:encoded> </item> <item><title>By: softwarefreak</title><link>http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html/comment-page-1#comment-17512</link> <dc:creator>softwarefreak</dc:creator> <pubDate>Tue, 08 Nov 2011 05:07:31 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1246#comment-17512</guid> <description>$h_old) { $rat=$w_old/$w; } else { $rat=$h_old/$h; } $w_new=round($w_old/$rat); $h_new=round($h_old/$rat); $new = imageCreateTrueColor($w_new, $h_new); imageCopyResized($new, $old, 0, 0, 0, 0, $w_new, $h_new, $w_old, $h_old); imageJpeg($new,&quot;&quot;,&quot;100&quot;); } } ?&gt;save the file as resize.phpUse it in a way like thishttp://yoursite.com/resize.php?pic=/uploads/image.jpg</description> <content:encoded><![CDATA[<p>$h_old) {<br /> $rat=$w_old/$w;<br /> }<br /> else {<br /> $rat=$h_old/$h;<br /> }<br /> $w_new=round($w_old/$rat);<br /> $h_new=round($h_old/$rat);<br /> $new = imageCreateTrueColor($w_new, $h_new);<br /> imageCopyResized($new, $old, 0, 0, 0, 0, $w_new, $h_new, $w_old, $h_old);<br /> imageJpeg($new,&#8221;",&#8221;100&#8243;);<br /> }<br /> }<br /> ?&gt;</p><p>save the file as resize.php</p><p>Use it in a way like this</p><p><a href="http://yoursite.com/resize.php?pic=/uploads/image.jpg" rel="nofollow">http://yoursite.com/resize.php?pic=/uploads/image.jpg</a></p> ]]></content:encoded> </item> <item><title>By: Oglasi</title><link>http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html/comment-page-1#comment-14224</link> <dc:creator>Oglasi</dc:creator> <pubDate>Tue, 01 Mar 2011 22:58:49 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1246#comment-14224</guid> <description>Nice post, i work on some php project and i&#039;m using some of this snippets. Works very well. Thank you.</description> <content:encoded><![CDATA[<p>Nice post, i work on some php project and i&#8217;m using some of this snippets. Works very well. Thank you.</p> ]]></content:encoded> </item> <item><title>By: WebDev</title><link>http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html/comment-page-1#comment-13674</link> <dc:creator>WebDev</dc:creator> <pubDate>Mon, 03 Jan 2011 07:08:28 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1246#comment-13674</guid> <description>Hi Viral.Excellent Post. How can we create Thumbnail form uploaded image (JPG, GIF, PNG) on a fly? Please Help.</description> <content:encoded><![CDATA[<p>Hi Viral.</p><p>Excellent Post.<br /> How can we create Thumbnail form uploaded image (JPG, GIF, PNG) on a fly?<br /> Please Help.</p> ]]></content:encoded> </item> <item><title>By: Bill</title><link>http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html/comment-page-1#comment-13400</link> <dc:creator>Bill</dc:creator> <pubDate>Thu, 18 Nov 2010 10:22:08 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1246#comment-13400</guid> <description>In regard to mysql_pconnect() vs mysql_connect(), be careful when taking advice.  mysql_pconnect() is viewed by many as unneccessary and, in some cases, even a bad choice for typical database programmers.  Persistant connections can be costly in terms of resources. For more info go here... http://efreedom.com/Question/1-247807/Mysql-Connect-VS-Mysql-Pconnect</description> <content:encoded><![CDATA[<p>In regard to mysql_pconnect() vs mysql_connect(), be careful when taking advice.  mysql_pconnect() is viewed by many as unneccessary and, in some cases, even a bad choice for typical database programmers.  Persistant connections can be costly in terms of resources. For more info go here&#8230; <a href="http://efreedom.com/Question/1-247807/Mysql-Connect-VS-Mysql-Pconnect" rel="nofollow">http://efreedom.com/Question/1-247807/Mysql-Connect-VS-Mysql-Pconnect</a></p> ]]></content:encoded> </item> <item><title>By: Little Geek</title><link>http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html/comment-page-1#comment-13302</link> <dc:creator>Little Geek</dc:creator> <pubDate>Mon, 01 Nov 2010 10:47:50 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1246#comment-13302</guid> <description>OK! i must say these are really good examples of useful handy php snippets. i have collected some snippets, it might be handy for others too. here is the link : http://www.alittlegeek.com/18-php-snippets-to-boost-your-development-speed/. i am thinking of using some of your snippets as a new post in my blog.</description> <content:encoded><![CDATA[<p>OK! i must say these are really good examples of useful handy php snippets. i have collected some snippets, it might be handy for others too. here is the link : <a href="http://www.alittlegeek.com/18-php-snippets-to-boost-your-development-speed/" rel="nofollow">http://www.alittlegeek.com/18-php-snippets-to-boost-your-development-speed/</a>. i am thinking of using some of your snippets as a new post in my blog.</p> ]]></content:encoded> </item> <item><title>By: Viral Patel</title><link>http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html/comment-page-1#comment-11925</link> <dc:creator>Viral Patel</dc:creator> <pubDate>Tue, 12 Jan 2010 18:20:38 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1246#comment-11925</guid> <description>@Hardik: Well I am not aware of such function in PHP. I think there is no HTTP header element which holds such data. Let  me know in case you find a way to achieve this.</description> <content:encoded><![CDATA[<p>@Hardik: Well I am not aware of such function in PHP. I think there is no HTTP header element which holds such data.<br /> Let  me know in case you find a way to achieve this.</p> ]]></content:encoded> </item> <item><title>By: Hardik</title><link>http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html/comment-page-1#comment-11923</link> <dc:creator>Hardik</dc:creator> <pubDate>Tue, 12 Jan 2010 12:32:44 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1246#comment-11923</guid> <description>Hey Viral,I wanna know is der a function thru which i can get client&#039;s computer name and I.P address, Computer Name Must... whenever a client my web site his computer name shud be stored in my db... Thanx in Advance.</description> <content:encoded><![CDATA[<p>Hey Viral,</p><p>I wanna know is der a function thru which i can get client&#8217;s computer name and I.P address,<br /> Computer Name Must&#8230;<br /> whenever a client my web site his computer name shud be stored in my db&#8230;<br /> Thanx in Advance.</p> ]]></content:encoded> </item> <item><title>By: babu</title><link>http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html/comment-page-1#comment-11711</link> <dc:creator>babu</dc:creator> <pubDate>Sat, 28 Nov 2009 12:00:06 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1246#comment-11711</guid> <description>hai this is really superb. regards babu.p</description> <content:encoded><![CDATA[<p>hai this is really superb.<br /> regards<br /> babu.p</p> ]]></content:encoded> </item> <item><title>By: Viral Patel</title><link>http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html/comment-page-1#comment-11678</link> <dc:creator>Viral Patel</dc:creator> <pubDate>Wed, 18 Nov 2009 17:54:54 +0000</pubDate> <guid isPermaLink="false">http://viralpatel.net/blogs/?p=1246#comment-11678</guid> <description>@Mr. Foo: I think you are pointing to Tip #12. I have corrected the typo error. Thanks</description> <content:encoded><![CDATA[<p>@Mr. Foo: I think you are pointing to Tip #12. I have corrected the typo error. Thanks</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: viralpatel.net @ 2012-02-09 10:26:10 -->
