<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Download PDF Instead of Loading into the browser</title>
	<link>http://askmichel.icoder.com/2007/04/06/download-pdf-instead-of-loading-into-the-browser/</link>
	<description>i Code to help you profit!</description>
	<pubDate>Sat, 19 May 2012 18:08:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.3</generator>

	<item>
		<title>by: ausis</title>
		<link>http://askmichel.icoder.com/2007/04/06/download-pdf-instead-of-loading-into-the-browser/#comment-274</link>
		<pubDate>Sat, 12 Jul 2008 23:55:46 +0000</pubDate>
		<guid>http://askmichel.icoder.com/2007/04/06/download-pdf-instead-of-loading-into-the-browser/#comment-274</guid>
					<description>cool thanks for that Michel I have been trying to figure this out for my mobile downloads section of my site at ausis.iinfo &lt;a href=&quot;http://www.ausis.info/mobile-page1.html&quot; rel=&quot;nofollow&quot;&gt;Free mobile image downloads&lt;/a&gt; For YOU...</description>
		<content:encoded><![CDATA[<p>cool thanks for that Michel I have been trying to figure this out for my mobile downloads section of my site at ausis.iinfo <a href="http://www.ausis.info/mobile-page1.html" rel="nofollow">Free mobile image downloads</a> For YOU&#8230;
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: michel</title>
		<link>http://askmichel.icoder.com/2007/04/06/download-pdf-instead-of-loading-into-the-browser/#comment-130</link>
		<pubDate>Sat, 05 May 2007 05:48:45 +0000</pubDate>
		<guid>http://askmichel.icoder.com/2007/04/06/download-pdf-instead-of-loading-into-the-browser/#comment-130</guid>
					<description>Hi Richard,

Yes, you can use this solution for files of any type.
For .mp3

&lt;code&gt;&amp;#60;Files *.mp3&amp;#62;
  ForceType application/octet-stream
  Header set Content-Disposition attachment
  Header set Content-Transfer-Encoding binary
&amp;#60;/Files&amp;#62;&lt;/code&gt;

You'll need to adjust the &lt;code&gt;download.php&lt;/code&gt; script to work with .mp3
Open it with a test-editor, find the line:
&lt;span style=&quot;color:blue&quot;&gt;if ($name &amp;#38;&amp;#38; preg_match(&amp;#34;/\.&lt;span style=&quot;color:red&quot;&gt;pdf&lt;/span&gt;$/i&amp;#34;,$name) &amp;#38;&amp;#38; file_exists($name)) {&lt;/span&gt;
Substitute the &lt;span style=&quot;color:red&quot;&gt;pdf&lt;/span&gt; with &lt;span style=&quot;color:red&quot;&gt;mp3&lt;/span&gt;.

Then use: &lt;code&gt;download.php?name=talk.mp3&lt;/code&gt; instead of &lt;code&gt;talk.mp3&lt;/code&gt;

Michel</description>
		<content:encoded><![CDATA[<p>Hi Richard,</p>
<p>Yes, you can use this solution for files of any type.<br />
For .mp3</p>
<p><code>&lt;Files *.mp3&gt;<br />
  ForceType application/octet-stream<br />
  Header set Content-Disposition attachment<br />
  Header set Content-Transfer-Encoding binary<br />
&lt;/Files&gt;</code></p>
<p>You&#8217;ll need to adjust the <code>download.php</code> script to work with .mp3<br />
Open it with a test-editor, find the line:<br />
<span style="color:blue">if ($name &amp;&amp; preg_match(&quot;/\.<span style="color:red">pdf</span>$/i&quot;,$name) &amp;&amp; file_exists($name)) {</span><br />
Substitute the <span style="color:red">pdf</span> with <span style="color:red">mp3</span>.</p>
<p>Then use: <code>download.php?name=talk.mp3</code> instead of <code>talk.mp3</code></p>
<p>Michel
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Richard</title>
		<link>http://askmichel.icoder.com/2007/04/06/download-pdf-instead-of-loading-into-the-browser/#comment-129</link>
		<pubDate>Fri, 04 May 2007 16:53:17 +0000</pubDate>
		<guid>http://askmichel.icoder.com/2007/04/06/download-pdf-instead-of-loading-into-the-browser/#comment-129</guid>
					<description>Hi Michel

would this work for .mp3 also with the following adjustments?


  ForceType application/octet-stream
  Header set Content-Disposition attachment
  Header set Content-Transfer-Encoding binary


or
download.php?name= talk.mp3 instead of talk.mp3
 
thanks in Advance
Richard</description>
		<content:encoded><![CDATA[<p>Hi Michel</p>
<p>would this work for .mp3 also with the following adjustments?</p>
<p>  ForceType application/octet-stream<br />
  Header set Content-Disposition attachment<br />
  Header set Content-Transfer-Encoding binary</p>
<p>or<br />
download.php?name= talk.mp3 instead of talk.mp3</p>
<p>thanks in Advance<br />
Richard
</p>
]]></content:encoded>
				</item>
</channel>
</rss>

