<?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"
	>
<channel>
	<title>Comments on: Displaying File Icons for Downloads With PHP</title>
	<atom:link href="http://aarronwalter.com/2006/12/14/displaying-file-icons-for-downloads-with-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://aarronwalter.com/2006/12/14/displaying-file-icons-for-downloads-with-php/</link>
	<description></description>
	<pubDate>Wed, 20 Aug 2008 17:25:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Large balloon guy</title>
		<link>http://aarronwalter.com/2006/12/14/displaying-file-icons-for-downloads-with-php/#comment-28783</link>
		<dc:creator>Large balloon guy</dc:creator>
		<pubDate>Tue, 15 Jan 2008 22:07:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.aarronwalter.com/2006/12/14/displaying-file-icons-for-downloads-with-php/#comment-28783</guid>
		<description>Interesting thing nacho is mentioning. It would be cool if it was a system icon so the users os would know what to do with the file. I have never seen anything like it in PHP. We are more talking about browser restrictions here.</description>
		<content:encoded><![CDATA[<p>Interesting thing nacho is mentioning. It would be cool if it was a system icon so the users os would know what to do with the file. I have never seen anything like it in PHP. We are more talking about browser restrictions here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich Lyon</title>
		<link>http://aarronwalter.com/2006/12/14/displaying-file-icons-for-downloads-with-php/#comment-15814</link>
		<dc:creator>Rich Lyon</dc:creator>
		<pubDate>Thu, 27 Sep 2007 23:07:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.aarronwalter.com/2006/12/14/displaying-file-icons-for-downloads-with-php/#comment-15814</guid>
		<description>There is a much easier method,

Once you have the extension, do something like:

$ext = // get extension

if( file_exists("./icons/".$ext.".png") ){
   $img = "./icons/".$ext.".png";
} else {
    $img = "./icons/unkown.png";
}

print "";</description>
		<content:encoded><![CDATA[<p>There is a much easier method,</p>
<p>Once you have the extension, do something like:</p>
<p>$ext = // get extension</p>
<p>if( file_exists(&#8221;./icons/&#8221;.$ext.&#8221;.png&#8221;) ){<br />
   $img = &#8220;./icons/&#8221;.$ext.&#8221;.png&#8221;;<br />
} else {<br />
    $img = &#8220;./icons/unkown.png&#8221;;<br />
}</p>
<p>print &#8220;&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NAcho</title>
		<link>http://aarronwalter.com/2006/12/14/displaying-file-icons-for-downloads-with-php/#comment-8605</link>
		<dc:creator>NAcho</dc:creator>
		<pubDate>Wed, 04 Jul 2007 13:54:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.aarronwalter.com/2006/12/14/displaying-file-icons-for-downloads-with-php/#comment-8605</guid>
		<description>It will be better to obtain the icon directly from the system.
In java that can be easily achieved:

//Create a temporary file with the specified extension
     file = File.createTempFile("icon", "." + extension);
 
     FileSystemView view = FileSystemView.getFileSystemView();
     Icon icon = view.getSystemIcon(file);

     //Delete the temporary file
     file.delete();

i dont know how to do it in php, but sure it is possible, since the icon is provided by the system.
Regards,
Nacho</description>
		<content:encoded><![CDATA[<p>It will be better to obtain the icon directly from the system.<br />
In java that can be easily achieved:</p>
<p>//Create a temporary file with the specified extension<br />
     file = File.createTempFile(&#8221;icon&#8221;, &#8220;.&#8221; + extension);</p>
<p>     FileSystemView view = FileSystemView.getFileSystemView();<br />
     Icon icon = view.getSystemIcon(file);</p>
<p>     //Delete the temporary file<br />
     file.delete();</p>
<p>i dont know how to do it in php, but sure it is possible, since the icon is provided by the system.<br />
Regards,<br />
Nacho</p>
]]></content:encoded>
	</item>
</channel>
</rss>
