<?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: PHP File Downloads</title>
	<atom:link href="http://www.ultramegatech.com/2009/09/php-file-downloads/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ultramegatech.com/2009/09/php-file-downloads/</link>
	<description>Web development blog</description>
	<lastBuildDate>Wed, 11 Apr 2012 03:57:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Shimon Doodkin</title>
		<link>http://www.ultramegatech.com/2009/09/php-file-downloads/comment-page-1/#comment-1797</link>
		<dc:creator>Shimon Doodkin</dc:creator>
		<pubDate>Fri, 27 May 2011 17:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.ultramegatech.com/blog/?p=677#comment-1797</guid>
		<description>use ob_end_clean()

and exit() at the end of the file</description>
		<content:encoded><![CDATA[<p>use ob_end_clean()</p>
<p>and exit() at the end of the file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Moe</title>
		<link>http://www.ultramegatech.com/2009/09/php-file-downloads/comment-page-1/#comment-1736</link>
		<dc:creator>Moe</dc:creator>
		<pubDate>Sat, 08 Jan 2011 21:27:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.ultramegatech.com/blog/?p=677#comment-1736</guid>
		<description>Hello,

The code below works on my localhost to download a file. However, on top of my downloaded file there are 160 lines of HTML tags. How can I eliminate these tags and just get the plain file?
I appreciate your advice.

$fd = basename($csv);		
header(&quot;Content-type: application/octet-stream&quot;); 
header(&quot;Content-Disposition: attachment; filename=\&quot;&quot;.$fd.&quot;\&quot;&quot;); 
header(&quot;Content-Description: Download&quot;);	
readfile($csv);</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>The code below works on my localhost to download a file. However, on top of my downloaded file there are 160 lines of HTML tags. How can I eliminate these tags and just get the plain file?<br />
I appreciate your advice.</p>
<p>$fd = basename($csv);<br />
header(&#8220;Content-type: application/octet-stream&#8221;);<br />
header(&#8220;Content-Disposition: attachment; filename=\&#8221;".$fd.&#8221;\&#8221;");<br />
header(&#8220;Content-Description: Download&#8221;);<br />
readfile($csv);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.ultramegatech.com/2009/09/php-file-downloads/comment-page-1/#comment-376</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 07 Oct 2009 04:28:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.ultramegatech.com/blog/?p=677#comment-376</guid>
		<description>Good suggestion. I&#039;m not sure why I put that there...</description>
		<content:encoded><![CDATA[<p>Good suggestion. I&#8217;m not sure why I put that there&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stepas</title>
		<link>http://www.ultramegatech.com/2009/09/php-file-downloads/comment-page-1/#comment-373</link>
		<dc:creator>Stepas</dc:creator>
		<pubDate>Mon, 05 Oct 2009 06:51:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.ultramegatech.com/blog/?p=677#comment-373</guid>
		<description>A great article! I suggest moving set_time_limit(0); out of the while() loop.</description>
		<content:encoded><![CDATA[<p>A great article! I suggest moving set_time_limit(0); out of the while() loop.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

