<?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>Sat, 25 May 2013 22:52:58 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[C. Sadeesh Kumar's Blog: Smart File Type Detection Using PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16785</guid>
      <link>http://www.phpdeveloper.org/news/16785</link>
      <description><![CDATA[<p>
In a new post today <i>C. Sadeesh Kumar</i> has a quick tip to help your script <a href="http://cakephp-php.blogspot.com/2011/08/smart-file-type-detection-using-php.html">detect file types</a> without having to rely on the extension to be correct.
</p>
<blockquote>
In most web applications today, there is a need to allow users to upload images, audio and video files. Sometimes, we also need to restrict certain types of files from being uploaded - an executable file being an obvious example. Security aside, one might also want to prevent users from misusing the upload facility, e.g. uploading copyrighted music files illegally and using the service to promote piracy! In this article, we'll look into a few ways in which we can achieve this.
</blockquote>
<p>
The trick to his example is in using the <a href="http://pecl.php.net/package/Fileinfo">Fileinfo</a> PECL extension. With the help of this extension you can look inside the file and pick out the "magic bytes" (the first few bytes of a file) and see <a href="http://www.garykessler.net/library/file_sigs.html">what MIME type</a> the file really is. He includes a simple example of using the extension on a file and a file upload script that checks the type and handles the file accordingly.
</p>]]></description>
      <pubDate>Mon, 29 Aug 2011 12:07:53 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schluter's Blog: A hidden gem in PHP 5.3: fileinfo]]></title>
      <guid>http://www.phpdeveloper.org/news/11586</guid>
      <link>http://www.phpdeveloper.org/news/11586</link>
      <description><![CDATA[<p>
<i>Johannes Schluter</i> has pointed out a "hidden gem" for PHP 5.3 in his <a href="http://schlueters.de/blog/archives/92-A-hidden-gem-in-PHP-5.3-fileinfo.html">latest blog post</a> - the <a href="http://php.net/fileinfo">fileinfo extension</a>.
</p>
<blockquote>
This series is not meant to be complete but some personal choice, these blog postings are also no replacement for documentation, but just pointers. My goal is that you try out 5.3 right now so we can fix bugs as soon as possible before releasing it  The NEWS file has a quite short entry for my first subject: Added fileinfo extension as replacement for mime_magic extension. (Derick)
</blockquote>
<p>
He looks at one situation where <a href="http://php.net/fileinfo">the extension</a> could come in very handy - getting the content type of the file for a download push - as well as why its better than the older mime_content_type function.
</p>]]></description>
      <pubDate>Wed, 17 Dec 2008 09:35:59 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Zend Weekly Summaries Issue #322]]></title>
      <guid>http://www.phpdeveloper.org/news/7181</guid>
      <link>http://www.phpdeveloper.org/news/7181</link>
      <description><![CDATA[<p>
The latest <a href="http://devzone.zend.com/node/view/id/1599">weekly summary</a> for the PHP mailing lists has been posted over on the Zend Developer Zone. This week, discussions included:
<ul>
<li>Sandboxed semaphores
<li>Focus on *printf [continued]
<li>PHP 5.2.1 RC2 and PHP 4.4.5 RC1
<li>It's all in the HEAD
</ul>
Descriptions of each of <a href="http://devzone.zend.com/node/view/id/1599">the headings</a> are provided, including code and a "short version" for those on the run.
</p>
<p>
Be sure to check back <a href="http://devzone.zend.com/public/view/tag/Weekly_Summaries">each week</a> for a new summary.
</p>]]></description>
      <pubDate>Mon, 29 Jan 2007 12:27:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ilia Alshanetsky's Blog: GDChart & Fileinfo Releases]]></title>
      <guid>http://www.phpdeveloper.org/news/4603</guid>
      <link>http://www.phpdeveloper.org/news/4603</link>
      <description><![CDATA[According to <a href="http://ilia.ws/archives/99-GDChart-Fileinfo-Releases.html">this new post</a> from <i>Ilia Alshanetsky</i>'s blog, he's wrapped up new versions of his PECL extensions, Fileinfo and GDChart.
<p>
<quote>
<i>
Just finished packaging Fileinfo 1.0.3 that finally builds on both PHP 5.1 and 5.0 properly. You can download the new version by running "pecl install fileinfo" or download the tgz file from here.
<p>
I've also made the release of GDChart 0.2 that is nearly a complete rewrite of the extension, originally written by Rasmus that allows it to work with PHP 5.1. This extension wraps around the bundled gdchart library and allows you with just a few lines of code draw 20 different graphs types.
</i>
</quote>
<p>
The <a href="http://pecl.php.net/package/GDChart">GDChart</a> package looks especially useful, making it a simple matter of feeding in the data you want to render and out popps a graph. Previously, there's been this functionality via other scripts, but it's nice to see something native...]]></description>
      <pubDate>Wed, 04 Jan 2006 06:48:21 -0600</pubDate>
    </item>
  </channel>
</rss>
