<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1044640" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1044640</link>
    <description></description>
    <language>en</language>
          <item>
    <title>That&#039;s not only an INSECURE</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/how-upload-images-using-php#comment-1244099</link>
    <description> &lt;p&gt;That&#039;s not only an INSECURE approach, it&#039;s badly written, wont work and incomplete!&lt;/p&gt;
&lt;p&gt;The mime type alone is not really a secure method to identify a file type.&lt;br /&gt;
You can use it, but in conjunction with other things, such as checking file extension(s) (is .jpg or is .gif etc).&lt;/p&gt;
&lt;p&gt;Also, why not allow png? It&#039;s one of the best compression formats for the web.&lt;/p&gt;
&lt;p&gt;You set the variable &quot;$msg&quot; to contain various error messages, but never actually use the var (never echoed).&lt;/p&gt;
&lt;p&gt;You perform an &quot;IF&quot; test on these two variables: $userfile_size AND $userfile_type, but you haven&#039;t actually set them to be anything, they are null and therefore them checking if filesize and type is as should be will always return FALSE (i.e. they will be allowed regardless of their type and size).&lt;/p&gt;
&lt;p&gt;Besides, you didn&#039;t set the required file size limit in the html form anyway.&lt;/p&gt;
&lt;p&gt;________________&lt;/p&gt;
&lt;p&gt;All in all, it&#039;s a fairly bad tutorial considering you are a web development site! Do you provide clients with this poor level of security in their code and sites?&lt;br /&gt;
Also, this is worded &quot;EXACTLY&quot; on other sites, so is this your tutorial or someone else&#039;s you have copied?&lt;/p&gt;
&lt;p&gt;I can only advise anyone reading this to stay WELL CLEAR of using &lt;code&gt;elevationnewmedia.com&lt;/code&gt;&#039;s web services!&lt;/p&gt;
 </description>
     <pubDate>Fri, 07 Aug 2009 12:37:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1244099 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
