<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 03:52:16 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[MrPHP.com.au: Image Cache using phpThumb and .htaccess]]></title>
      <guid>http://www.phpdeveloper.org/news/11217</guid>
      <link>http://www.phpdeveloper.org/news/11217</link>
      <description><![CDATA[<p>
<i>Brett</i> send in a link to a <A href="http://mrphp.com.au/code/project/miscellaneous/image-cache-using-phpthumb-and-htaccess">new post</a> on his "Mr PHP" blog about a method he's come up with to cache images using the <a href="http://phpthumb.sourceforge.net/">phpThumb</a> library.
</p>
<blockquote>
Generate thumbs by visiting a URL such as your.com/thumbs/images/image.50x50.jpg. This will create a 50x50px thumbnail of your.com/images/image.jpg. The thumb will be stored on your server at your.com/thumbs/images/image.50x50.jpg so the next request for the same image will be loaded without loading php for ultra fast image cache.
</blockquote>
<p>
The phpThumb tool lets you dynamically resize an image and, if one does not exist for it, make a thumbnail that's output and cached. From then on the script just pulls from that local copy. He includes his code to get it working and the mod_rewrite rule that maps an image request back to it (so it's still "/images/myimage.jpg" instead of "/app/phpThumb.php?src=myimage.jpg&w=100&h=100" in the img src).
</p>]]></description>
      <pubDate>Wed, 15 Oct 2008 11:12:14 -0500</pubDate>
    </item>
  </channel>
</rss>
