<?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: Display a download dialog for pdf in PHP</title>
	<atom:link href="http://eisabainyo.net/weblog/2009/06/30/display-a-download-dialog-for-pdf-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://eisabainyo.net/weblog/2009/06/30/display-a-download-dialog-for-pdf-in-php/</link>
	<description>Web Development, Web Design, Web Applications, Web 2.0, AJAX, WordPress Themes, Search Engine Optimisation, Latest Technologies and more..</description>
	<lastBuildDate>Tue, 20 Mar 2012 09:48:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Nigel Nquande</title>
		<link>http://eisabainyo.net/weblog/2009/06/30/display-a-download-dialog-for-pdf-in-php/comment-page-1/#comment-151388</link>
		<dc:creator>Nigel Nquande</dc:creator>
		<pubDate>Fri, 28 Jan 2011 23:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=694#comment-151388</guid>
		<description>I’m using this code to force browser’s download dialog.I have problem only with IE 6 because the downloaded file size is 0 bytes.

&lt;?php
$fp=fopen(‘c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3′,’r&#039;);
$name=basename(“c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3″);
$size=filesize(‘c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3′);
header(‘pragma: cache’);
header(‘pragma: public’);
header(‘Content-Type: audio/mpeg’);
header(‘Content-Length:’. $size); /* here&#039;s your fix (var outside single quotes */
header(“Cache-Control: private”,false);
header(‘Cache-Control: max-age=0′);
header(“Content-Transfer-Encoding: binary”);
header(“Content-Disposition: attachment;filename= $name”);
fpassthru($fp);
fclose($fp);
?&gt;

Ei, you need to fix your code : surround input from posts with htmlspecialchars(), because it ate the &lt;?php ... ?&gt; code in my previous response.</description>
		<content:encoded><![CDATA[<p>I’m using this code to force browser’s download dialog.I have problem only with IE 6 because the downloaded file size is 0 bytes.</p>
<p>&lt;?php<br />
$fp=fopen(‘c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3′,’r&#8217;);<br />
$name=basename(“c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3″);<br />
$size=filesize(‘c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3′);<br />
header(‘pragma: cache’);<br />
header(‘pragma: public’);<br />
header(‘Content-Type: audio/mpeg’);<br />
header(‘Content-Length:’. $size); /* here&#8217;s your fix (var outside single quotes */<br />
header(“Cache-Control: private”,false);<br />
header(‘Cache-Control: max-age=0′);<br />
header(“Content-Transfer-Encoding: binary”);<br />
header(“Content-Disposition: attachment;filename= $name”);<br />
fpassthru($fp);<br />
fclose($fp);<br />
?&gt;</p>
<p>Ei, you need to fix your code : surround input from posts with htmlspecialchars(), because it ate the &lt;?php &#8230; ?&gt; code in my previous response.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel Nquande</title>
		<link>http://eisabainyo.net/weblog/2009/06/30/display-a-download-dialog-for-pdf-in-php/comment-page-1/#comment-151386</link>
		<dc:creator>Nigel Nquande</dc:creator>
		<pubDate>Fri, 28 Jan 2011 23:09:16 +0000</pubDate>
		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=694#comment-151386</guid>
		<description>I’m using this code to force browser’s download dialog.I have problem only with IE 6 because the downloaded file size is 0 bytes.

</description>
		<content:encoded><![CDATA[<p>I’m using this code to force browser’s download dialog.I have problem only with IE 6 because the downloaded file size is 0 bytes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shivangi</title>
		<link>http://eisabainyo.net/weblog/2009/06/30/display-a-download-dialog-for-pdf-in-php/comment-page-1/#comment-139792</link>
		<dc:creator>Shivangi</dc:creator>
		<pubDate>Tue, 26 Oct 2010 08:49:50 +0000</pubDate>
		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=694#comment-139792</guid>
		<description>Hello,

I have one problem using the above snippet for pdf download is it does not support russian characterset i.e UTF-8. So, can anyone suggest me the solution for this.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I have one problem using the above snippet for pdf download is it does not support russian characterset i.e UTF-8. So, can anyone suggest me the solution for this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pedro</title>
		<link>http://eisabainyo.net/weblog/2009/06/30/display-a-download-dialog-for-pdf-in-php/comment-page-1/#comment-105208</link>
		<dc:creator>Pedro</dc:creator>
		<pubDate>Mon, 05 Oct 2009 01:49:50 +0000</pubDate>
		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=694#comment-105208</guid>
		<description></description>
		<content:encoded><![CDATA[<p>i think i would need something similar to that for my website?</p>
<p>Can you give me a little hand?</p>
<p>I would like to let my visitors install the Greasemonkey scripts that ive hosted on my server. But instead of showing the &#8216;installation window&#8217; shows the script code&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hosting</title>
		<link>http://eisabainyo.net/weblog/2009/06/30/display-a-download-dialog-for-pdf-in-php/comment-page-1/#comment-100636</link>
		<dc:creator>hosting</dc:creator>
		<pubDate>Sun, 30 Aug 2009 19:35:59 +0000</pubDate>
		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=694#comment-100636</guid>
		<description>I&#039;m using this code to force browser&#039;s download dialog.I have problem only with IE 6 because the downloaded file size is 0 bytes.

$fp=fopen(&#039;c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3&#039;,&#039;r&#039;);
$name=basename(&quot;c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3&quot;);
$size=filesize(&#039;c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3&#039;);
header(&#039;pragma: cache&#039;);
header(&#039;pragma: public&#039;);
header(&#039;Content-Type: audio/mpeg&#039;);
header(&#039;Content-Length:$size&#039;);
header(&quot;Cache-Control: private&quot;,false);
header(&#039;Cache-Control: max-age=0&#039;);
header(&quot;Content-Transfer-Encoding: binary&quot;);
header(&quot;Content-Disposition: attachment;filename= $name&quot;);
fpassthru($fp);
fclose($fp);</description>
		<content:encoded><![CDATA[<p>I&#8217;m using this code to force browser&#8217;s download dialog.I have problem only with IE 6 because the downloaded file size is 0 bytes.</p>
<p>$fp=fopen(&#8216;c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3&#8242;,&#8217;r');<br />
$name=basename(&#8220;c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3&#8243;);<br />
$size=filesize(&#8216;c:xampphtdocspesmeR.E.M.-Losing_My_Religon.mp3&#8242;);<br />
header(&#8216;pragma: cache&#8217;);<br />
header(&#8216;pragma: public&#8217;);<br />
header(&#8216;Content-Type: audio/mpeg&#8217;);<br />
header(&#8216;Content-Length:$size&#8217;);<br />
header(&#8220;Cache-Control: private&#8221;,false);<br />
header(&#8216;Cache-Control: max-age=0&#8242;);<br />
header(&#8220;Content-Transfer-Encoding: binary&#8221;);<br />
header(&#8220;Content-Disposition: attachment;filename= $name&#8221;);<br />
fpassthru($fp);<br />
fclose($fp);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karen</title>
		<link>http://eisabainyo.net/weblog/2009/06/30/display-a-download-dialog-for-pdf-in-php/comment-page-1/#comment-94270</link>
		<dc:creator>Karen</dc:creator>
		<pubDate>Thu, 30 Jul 2009 04:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=694#comment-94270</guid>
		<description>Hi,   

I work for a web hosting site, which gives detailed information about different services and packages about hosting.

I came across your website : eisabainyo.net. And I find it very relevant to my client&#039;s site.

I would like to have your co-operation, which I believe will help us to increase the productivity of both our sites.

If you are interested do get back to me. Awaiting for your positive reply.

Regards,
Karen</description>
		<content:encoded><![CDATA[<p>Hi,   </p>
<p>I work for a web hosting site, which gives detailed information about different services and packages about hosting.</p>
<p>I came across your website : eisabainyo.net. And I find it very relevant to my client&#8217;s site.</p>
<p>I would like to have your co-operation, which I believe will help us to increase the productivity of both our sites.</p>
<p>If you are interested do get back to me. Awaiting for your positive reply.</p>
<p>Regards,<br />
Karen</p>
]]></content:encoded>
	</item>
</channel>
</rss>

