<?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/"
		>
<channel>
	<title>Comments on: Force Download Image File</title>
	<atom:link href="http://sandalian.com/php/force-download-image-file.html/feed" rel="self" type="application/rss+xml" />
	<link>http://sandalian.com/php/force-download-image-file.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=force-download-image-file</link>
	<description>Blog of Yeni Setiawan: Indonesian blogger, web developer and Opera browser user.</description>
	<lastBuildDate>Mon, 16 Jan 2012 15:41:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Pico RG</title>
		<link>http://sandalian.com/php/force-download-image-file.html/comment-page-1#comment-30974</link>
		<dc:creator>Pico RG</dc:creator>
		<pubDate>Sat, 18 Sep 2010 08:05:50 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=66#comment-30974</guid>
		<description>Thank you for this wonderful script man</description>
		<content:encoded><![CDATA[<p>Thank you for this wonderful script man</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: articles directory</title>
		<link>http://sandalian.com/php/force-download-image-file.html/comment-page-1#comment-19727</link>
		<dc:creator>articles directory</dc:creator>
		<pubDate>Mon, 10 Aug 2009 05:28:13 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=66#comment-19727</guid>
		<description>It is not working ..
Try this

$file = &quot;misc_tasks.txt&quot;

// Quick check to verify that the file exists
if( !file_exists($file) ) die(&quot;File not found&quot;);

// Force the download
header(&quot;Content-Disposition: attachment; filename=\&quot;&quot; . basename($file) . &quot;\&quot;&quot;);
header(&quot;Content-Length: &quot; . filesize($file));
header(&quot;Content-Type: application/octet-stream;&quot;);
readfile($file);</description>
		<content:encoded><![CDATA[<p>It is not working ..<br />
Try this</p>
<p>$file = &#8220;misc_tasks.txt&#8221;</p>
<p>// Quick check to verify that the file exists<br />
if( !file_exists($file) ) die(&#8220;File not found&#8221;);</p>
<p>// Force the download<br />
header(&#8220;Content-Disposition: attachment; filename=\&#8221;" . basename($file) . &#8220;\&#8221;");<br />
header(&#8220;Content-Length: &#8221; . filesize($file));<br />
header(&#8220;Content-Type: application/octet-stream;&#8221;);<br />
readfile($file);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nayeem</title>
		<link>http://sandalian.com/php/force-download-image-file.html/comment-page-1#comment-1575</link>
		<dc:creator>nayeem</dc:creator>
		<pubDate>Tue, 27 May 2008 12:27:22 +0000</pubDate>
		<guid isPermaLink="false">http://dev.sandalian.com/?p=66#comment-1575</guid>
		<description>is it possible to pass variable in filename</description>
		<content:encoded><![CDATA[<p>is it possible to pass variable in filename</p>
]]></content:encoded>
	</item>
</channel>
</rss>

