<?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/"
				  >
<channel>
<title>NEVERFEAR (Post Comments)</title>
<link>http://neverfear.org</link>
<description><![CDATA[NEVERFEAR.org weblog feed for post comments]]></description>
<image><title>NEVERFEAR (Post Comments)</title>
<link>http://neverfear.org</link>
<url>http://neverfear.org/favicon.ico</url>
</image>
<language>en-uk</language>
<pubDate>Tue, 14 Apr 2026 18:39:48 +0000</pubDate>
<item>
<title>Comment on Super simple (common) php hax for dummies.</title>
<link>http://neverfear.org/blog/view/13/Super_simple__common__php_hax_for_dummies_/comments#comment_28</link>
<pubDate>Mon, 07 Apr 2008 22:58:44 +0000</pubDate>
<description><![CDATA[<p>Your solution wouldn't work due to the undefined <code>getext()</code> function.
Aside from checking the suffix, you could just check that a valid image type was supplied.</p>

<pre class="text" style="font-family:monospace;">&lt;?php
// i assume here that the form field name value is &quot;imagefile&quot;
$imagename = basename($_FILES['imagefile']['name']);
$ext = substr($imagename, strrpos($imagename, '.') + 1);
// i hate suppression but you don't seem to mind it
if(@exif_imagetype($_FILES['imagefile']['tmp_name']) !== false)
{
    // process it here, its a valid image type, also do other checks
}
else
{
    @unlink($_FILES['imagefile']['tmp_name']); // its bad, get rid
}
?&gt;</pre>
]]></description>
<author>mulraney@gmail.com</author>
<guid isPermaLink="true" >http://neverfear.org/blog/view/13/Super_simple__common__php_hax_for_dummies_/comments#comment_28</guid>
</item>
</channel>
</rss>