<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: PHP File Upload</title>
	<atom:link href="http://phpprogramming.wordpress.com/2007/02/15/php-file-upload/feed/" rel="self" type="application/rss+xml" />
	<link>http://phpprogramming.wordpress.com/2007/02/15/php-file-upload/</link>
	<description></description>
	<lastBuildDate>Fri, 06 Nov 2009 11:34:38 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: atanok</title>
		<link>http://phpprogramming.wordpress.com/2007/02/15/php-file-upload/#comment-2056</link>
		<dc:creator>atanok</dc:creator>
		<pubDate>Tue, 13 Oct 2009 19:01:16 +0000</pubDate>
		<guid isPermaLink="false">http://phpprogramming.wordpress.com/2007/02/15/php-file-upload/#comment-2056</guid>
		<description>Abhijeet Pathak, yeah, because client side size checks are *totally* not going to be bypassed, right?

Keep doing server-side checks, client-side is there to avoid unintentional mistakes.</description>
		<content:encoded><![CDATA[<p>Abhijeet Pathak, yeah, because client side size checks are *totally* not going to be bypassed, right?</p>
<p>Keep doing server-side checks, client-side is there to avoid unintentional mistakes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: avinash lakhan</title>
		<link>http://phpprogramming.wordpress.com/2007/02/15/php-file-upload/#comment-1977</link>
		<dc:creator>avinash lakhan</dc:creator>
		<pubDate>Mon, 07 Jul 2008 06:42:34 +0000</pubDate>
		<guid isPermaLink="false">http://phpprogramming.wordpress.com/2007/02/15/php-file-upload/#comment-1977</guid>
		<description>$allowed_ext = &quot;jpg, JPG, gif, GIF, png, PNG, jpeg, JPEG, bmp, BMP&quot;; 
$extension = pathinfo($_FILES[&#039;image_name&#039;][&#039;name&#039;]);
	if($extension[&#039;filename&#039;]){
		$extension = $extension[extension];		
		$allowed_paths = explode(&quot;, &quot;, $allowed_ext);		
		$cnt=count($allowed_paths);
		for($i = 0; $i  $max_size) {		
				$error[]=&quot;File Size is too Big!&quot;;
			}		
			// Check Height &amp; Width			
			if ($max_width &amp;&amp; $max_height) {			
				list($width, $height, $type, $w) = getimagesize($_FILES[&#039;image_name&#039;][&#039;tmp_name&#039;]);				
				if($width &gt; $max_width &#124;&#124; $height &gt; $max_height) {			
					$error[]=&quot;File Height and/or Width are too Big!&quot;;
				}
			}	
		}else {		
			if($extension) {
				$error[]=&quot;.$extension is not a proper extension!&quot;;
			}else $error[]=&quot;Select File to Upload&quot;;
		}
	}else {
		if(empty($action)) {
			//$error[]=&quot;Select Product File to Upload&quot;;
			$new_error=false;
		}
	}
	if($new_error){
		$error[]=&#039;* All Fields are Mandetory&#039;;	
	}
	
	if(error){
		if($error) return $error=implode(&#039;&#039;,$error);	
	}</description>
		<content:encoded><![CDATA[<p>$allowed_ext = &#8220;jpg, JPG, gif, GIF, png, PNG, jpeg, JPEG, bmp, BMP&#8221;;<br />
$extension = pathinfo($_FILES['image_name']['name']);<br />
	if($extension['filename']){<br />
		$extension = $extension[extension];<br />
		$allowed_paths = explode(&#8220;, &#8220;, $allowed_ext);<br />
		$cnt=count($allowed_paths);<br />
		for($i = 0; $i  $max_size) {<br />
				$error[]=&#8221;File Size is too Big!&#8221;;<br />
			}<br />
			// Check Height &amp; Width<br />
			if ($max_width &amp;&amp; $max_height) {<br />
				list($width, $height, $type, $w) = getimagesize($_FILES['image_name']['tmp_name']);<br />
				if($width &gt; $max_width || $height &gt; $max_height) {<br />
					$error[]=&#8221;File Height and/or Width are too Big!&#8221;;<br />
				}<br />
			}<br />
		}else {<br />
			if($extension) {<br />
				$error[]=&#8221;.$extension is not a proper extension!&#8221;;<br />
			}else $error[]=&#8221;Select File to Upload&#8221;;<br />
		}<br />
	}else {<br />
		if(empty($action)) {<br />
			//$error[]=&#8221;Select Product File to Upload&#8221;;<br />
			$new_error=false;<br />
		}<br />
	}<br />
	if($new_error){<br />
		$error[]=&#8217;* All Fields are Mandetory&#8217;;<br />
	}</p>
<p>	if(error){<br />
		if($error) return $error=implode(&#8221;,$error);<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhijeet Pathak</title>
		<link>http://phpprogramming.wordpress.com/2007/02/15/php-file-upload/#comment-1966</link>
		<dc:creator>Abhijeet Pathak</dc:creator>
		<pubDate>Sat, 24 May 2008 04:17:36 +0000</pubDate>
		<guid isPermaLink="false">http://phpprogramming.wordpress.com/2007/02/15/php-file-upload/#comment-1966</guid>
		<description>Hey, good article, i didn&#039;t know about MAX_FILE_SIZE.. I always thought that we have to check file size at the server side, suddenly life has became so much easier.. :)</description>
		<content:encoded><![CDATA[<p>Hey, good article, i didn&#8217;t know about MAX_FILE_SIZE.. I always thought that we have to check file size at the server side, suddenly life has became so much easier.. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
