<?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: How To Force File Download With PHP</title>
	<atom:link href="http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/</link>
	<description>Slightly Advanced Computer Stuff (and some magic)</description>
	<lastBuildDate>Fri, 20 Nov 2009 22:08:06 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: White Shadow</title>
		<link>http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/comment-page-3/#comment-32257</link>
		<dc:creator>White Shadow</dc:creator>
		<pubDate>Wed, 04 Nov 2009 11:12:54 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/#comment-32257</guid>
		<description>It should be fine. That ob_end_clean() call is only relevant on servers that have output buffering turned on by default, so commenting it out shouldn&#039;t cause problems on most systems.</description>
		<content:encoded><![CDATA[<p>It should be fine. That ob_end_clean() call is only relevant on servers that have output buffering turned on by default, so commenting it out shouldn&#8217;t cause problems on most systems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Westerner</title>
		<link>http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/comment-page-3/#comment-32247</link>
		<dc:creator>Westerner</dc:creator>
		<pubDate>Wed, 04 Nov 2009 01:29:40 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/#comment-32247</guid>
		<description>I commented out @ob_end_clean(); and it seems to have fixed the issue. Do you think that will cause issues?</description>
		<content:encoded><![CDATA[<p>I commented out @ob_end_clean(); and it seems to have fixed the issue. Do you think that will cause issues?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Westerner</title>
		<link>http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/comment-page-3/#comment-32244</link>
		<dc:creator>Westerner</dc:creator>
		<pubDate>Wed, 04 Nov 2009 00:17:52 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/#comment-32244</guid>
		<description>Not sure why it would work fine in all browsers except Firefox. If the script was dropping the connection I would think it would drop it in all browsers. Do you think the gzip is causing the issue? Thank you for your time.</description>
		<content:encoded><![CDATA[<p>Not sure why it would work fine in all browsers except Firefox. If the script was dropping the connection I would think it would drop it in all browsers. Do you think the gzip is causing the issue? Thank you for your time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: White Shadow</title>
		<link>http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/comment-page-3/#comment-32243</link>
		<dc:creator>White Shadow</dc:creator>
		<pubDate>Wed, 04 Nov 2009 00:02:48 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/#comment-32243</guid>
		<description>No, the headers look fine to me. Perhaps there is some other difference, like the script dropping the connection too early or some other glitch? 

I just tried testing the script with FF 3.5.4 myself, but it seems to work fine on my machine (at least when the script is run on localhost).</description>
		<content:encoded><![CDATA[<p>No, the headers look fine to me. Perhaps there is some other difference, like the script dropping the connection too early or some other glitch? </p>
<p>I just tried testing the script with FF 3.5.4 myself, but it seems to work fine on my machine (at least when the script is run on localhost).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Westerner</title>
		<link>http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/comment-page-3/#comment-32241</link>
		<dc:creator>Westerner</dc:creator>
		<pubDate>Tue, 03 Nov 2009 23:43:53 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/#comment-32241</guid>
		<description>I was able to use the FireFox add-on to view the headers. The only difference I see is that when serving the download directly the header tag Conetet-Disposition is added.

Header direct download:

HTTP/1.1 200 OK
Date: Tue, 03 Nov 2009 21:30:35 GMT
Server: Apache/2.0.52 (Red Hat)
Vary: Host
Last-Modified: Tue, 03 Nov 2009 04:43:32 GMT
Etag: &quot;4f86a7-284aab-22e02500&quot;
Accept-Ranges: bytes
Content-Length: 2640555
Keep-Alive: timeout=15, max=91
Connection: Keep-Alive
Content-Type: application/zip

Headers through force download

HTTP/1.1 200 OK
Date: Tue, 03 Nov 2009 21:32:26 GMT
Server: Apache/2.0.52 (Red Hat)
Vary: Host,Accept-Encoding
X-Powered-By: PHP/4.3.9
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: must-revalidate, post-check=0, pre-check=0, private
Pragma: public
Content-Encoding: gzip
Content-Disposition: attachment; filename=&quot;1000smilies.zip&quot;
Content-Transfer-Encoding: binary
Accept-Ranges: bytes
Content-Length: 2640555
Keep-Alive: timeout=15, max=84
Connection: Keep-Alive
Content-Type: application/x-zip-compressed


I deleted some for testing so they matched up but I get the same result. Anything you see that sticks out at you?</description>
		<content:encoded><![CDATA[<p>I was able to use the FireFox add-on to view the headers. The only difference I see is that when serving the download directly the header tag Conetet-Disposition is added.</p>
<p>Header direct download:</p>
<p>HTTP/1.1 200 OK<br />
Date: Tue, 03 Nov 2009 21:30:35 GMT<br />
Server: Apache/2.0.52 (Red Hat)<br />
Vary: Host<br />
Last-Modified: Tue, 03 Nov 2009 04:43:32 GMT<br />
Etag: &#8220;4f86a7-284aab-22e02500&#8243;<br />
Accept-Ranges: bytes<br />
Content-Length: 2640555<br />
Keep-Alive: timeout=15, max=91<br />
Connection: Keep-Alive<br />
Content-Type: application/zip</p>
<p>Headers through force download</p>
<p>HTTP/1.1 200 OK<br />
Date: Tue, 03 Nov 2009 21:32:26 GMT<br />
Server: Apache/2.0.52 (Red Hat)<br />
Vary: Host,Accept-Encoding<br />
X-Powered-By: PHP/4.3.9<br />
Expires: Mon, 26 Jul 1997 05:00:00 GMT<br />
Cache-Control: must-revalidate, post-check=0, pre-check=0, private<br />
Pragma: public<br />
Content-Encoding: gzip<br />
Content-Disposition: attachment; filename=&#8221;1000smilies.zip&#8221;<br />
Content-Transfer-Encoding: binary<br />
Accept-Ranges: bytes<br />
Content-Length: 2640555<br />
Keep-Alive: timeout=15, max=84<br />
Connection: Keep-Alive<br />
Content-Type: application/x-zip-compressed</p>
<p>I deleted some for testing so they matched up but I get the same result. Anything you see that sticks out at you?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/comment-page-3/#comment-32238</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Tue, 03 Nov 2009 21:50:27 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/#comment-32238</guid>
		<description>Wireshark is way overkill for that kind of thing.  Fiddler2 is probably the way to go.  It&#039;s actually Microsoft-developed and free -- go figure (although beginning to be more common these days).  There is even a Firefox plugin for it.

But ya, I definitely agree with White Shadow here.  There is almost certainly a problem with your headers because I have had this working in Firefox for a while now.</description>
		<content:encoded><![CDATA[<p>Wireshark is way overkill for that kind of thing.  Fiddler2 is probably the way to go.  It&#8217;s actually Microsoft-developed and free &#8212; go figure (although beginning to be more common these days).  There is even a Firefox plugin for it.</p>
<p>But ya, I definitely agree with White Shadow here.  There is almost certainly a problem with your headers because I have had this working in Firefox for a while now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: White Shadow</title>
		<link>http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/comment-page-3/#comment-32237</link>
		<dc:creator>White Shadow</dc:creator>
		<pubDate>Tue, 03 Nov 2009 21:40:37 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/#comment-32237</guid>
		<description>&lt;a href=&quot;http://www.nirsoft.net/utils/smsniff.html&quot; rel=&quot;nofollow&quot;&gt;SmartSniff&lt;/a&gt; is free and pretty easy to use. &lt;a href=&quot;http://www.wireshark.org/&quot; rel=&quot;nofollow&quot;&gt;Wireshark&lt;/a&gt; is probably the most popular one, but personally I find it a bit too complicated.</description>
		<content:encoded><![CDATA[<p><a href="http://www.nirsoft.net/utils/smsniff.html" rel="nofollow">SmartSniff</a> is free and pretty easy to use. <a href="http://www.wireshark.org/" rel="nofollow">Wireshark</a> is probably the most popular one, but personally I find it a bit too complicated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: westerner</title>
		<link>http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/comment-page-3/#comment-32236</link>
		<dc:creator>westerner</dc:creator>
		<pubDate>Tue, 03 Nov 2009 21:23:41 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/#comment-32236</guid>
		<description>Sorry I am not familiar with a &quot;network sniffer&quot; I tried googling it and found some results for freeware but I have no clue how to use it. Can you suggest a free, easy one that I could use?</description>
		<content:encoded><![CDATA[<p>Sorry I am not familiar with a &#8220;network sniffer&#8221; I tried googling it and found some results for freeware but I have no clue how to use it. Can you suggest a free, easy one that I could use?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: White Shadow</title>
		<link>http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/comment-page-3/#comment-32234</link>
		<dc:creator>White Shadow</dc:creator>
		<pubDate>Tue, 03 Nov 2009 19:24:27 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/#comment-32234</guid>
		<description>What I would do : Use a network sniffer and compare the HTTP headers generated by the script to headers generated by normal downloads. Then tweak the script so that it outputs sufficiently similar headers.</description>
		<content:encoded><![CDATA[<p>What I would do : Use a network sniffer and compare the HTTP headers generated by the script to headers generated by normal downloads. Then tweak the script so that it outputs sufficiently similar headers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Westerner</title>
		<link>http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/comment-page-3/#comment-32206</link>
		<dc:creator>Westerner</dc:creator>
		<pubDate>Tue, 03 Nov 2009 05:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/#comment-32206</guid>
		<description>This works great in all browsers except Firefox (v 3.5.4). In Firefox there is a prompt that says:

C:\Users\Downloads\smilies.zip.part could not be saved, because the source file could not be read.

Try again later, or contact the server administrator.

But if you hit the retry button in the Firefox download manager it downloads ok. All other browsers work fine... any suggestions?</description>
		<content:encoded><![CDATA[<p>This works great in all browsers except Firefox (v 3.5.4). In Firefox there is a prompt that says:</p>
<p>C:\Users\Downloads\smilies.zip.part could not be saved, because the source file could not be read.</p>
<p>Try again later, or contact the server administrator.</p>
<p>But if you hit the retry button in the Firefox download manager it downloads ok. All other browsers work fine&#8230; any suggestions?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
