<?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: Protecting multiple downloads using unique URLs</title>
	<atom:link href="http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/</link>
	<description>Ardamis is a blog about web development and technology in general.</description>
	<lastBuildDate>Fri, 03 Feb 2012 03:06:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Maurice</title>
		<link>http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/#comment-71633</link>
		<dc:creator>Maurice</dc:creator>
		<pubDate>Thu, 15 Dec 2011 14:50:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.ardamis.com/?p=281#comment-71633</guid>
		<description>Hi,

 Our school site will offer a complete album of our choir. 20 songs = 20 different mp3 files. With your code, I have to generate a key 20 times for each customer. Would it be possible to have only one key for all the downloads?

Thank you!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p> Our school site will offer a complete album of our choir. 20 songs = 20 different mp3 files. With your code, I have to generate a key 20 times for each customer. Would it be possible to have only one key for all the downloads?</p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Artem</title>
		<link>http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/#comment-69794</link>
		<dc:creator>Artem</dc:creator>
		<pubDate>Thu, 08 Dec 2011 15:46:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.ardamis.com/?p=281#comment-69794</guid>
		<description>Sorry, my mistake, works in Opera too.</description>
		<content:encoded><![CDATA[<p>Sorry, my mistake, works in Opera too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Artem</title>
		<link>http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/#comment-69792</link>
		<dc:creator>Artem</dc:creator>
		<pubDate>Thu, 08 Dec 2011 15:39:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ardamis.com/?p=281#comment-69792</guid>
		<description>In FF works fine, in Opera filesize is 0 bytes. Any ideas? Maybe need to give filesize in header?</description>
		<content:encoded><![CDATA[<p>In FF works fine, in Opera filesize is 0 bytes. Any ideas? Maybe need to give filesize in header?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ardamis</title>
		<link>http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/#comment-62933</link>
		<dc:creator>ardamis</dc:creator>
		<pubDate>Mon, 10 Oct 2011 22:10:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.ardamis.com/?p=281#comment-62933</guid>
		<description>The best you can do, at least for Windows users, is to cause the browser to prompt the user to Open or Save the file.  Both choices save the file to the machine, but Open then causes the OS to perform the Open function on the file using the default application associated with that file type (a .PDF will open in Reader, while a .DOCX will open in Word, for example).


The browser has no control over how the file is opened or what happens afterward.


In the case of a zip file, an Open would probably just be a prompt for a location for the extracted files.</description>
		<content:encoded><![CDATA[<p>The best you can do, at least for Windows users, is to cause the browser to prompt the user to Open or Save the file.  Both choices save the file to the machine, but Open then causes the OS to perform the Open function on the file using the default application associated with that file type (a .PDF will open in Reader, while a .DOCX will open in Word, for example).</p>
<p>The browser has no control over how the file is opened or what happens afterward.</p>
<p>In the case of a zip file, an Open would probably just be a prompt for a location for the extracted files.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ken</title>
		<link>http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/#comment-62925</link>
		<dc:creator>ken</dc:creator>
		<pubDate>Mon, 10 Oct 2011 21:16:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.ardamis.com/?p=281#comment-62925</guid>
		<description>is it possible instead of download to set it to open and print a single copy ? I want my user to be able to open the .zip and print once.....</description>
		<content:encoded><![CDATA[<p>is it possible instead of download to set it to open and print a single copy ? I want my user to be able to open the .zip and print once&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lebisol</title>
		<link>http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/#comment-52070</link>
		<dc:creator>lebisol</dc:creator>
		<pubDate>Mon, 13 Jun 2011 20:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.ardamis.com/?p=281#comment-52070</guid>
		<description>Never mind, fix was to edit php.ini and change output_buffering=&quot;on&quot;</description>
		<content:encoded><![CDATA[<p>Never mind, fix was to edit php.ini and change output_buffering=&#8221;on&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lebisol</title>
		<link>http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/#comment-52068</link>
		<dc:creator>lebisol</dc:creator>
		<pubDate>Mon, 13 Jun 2011 19:31:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.ardamis.com/?p=281#comment-52068</guid>
		<description>Thanks for sharing your code, this is really cool.
I am having some issues implementing it thought, after running some tests I started getting errors as below. 
----
Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/files/download.php:12) in /home/user/public_html/files/download.php on line 109
... on line 110
... on line 111
... on line 112
----

Not sure the problem is as initially the script worked as customized. 
My &#039;customization&#039; is really only in fact that I moved the form into root index file - a folder above the &#039;files&#039; folder with form action being &#039;files/index.php&#039; and made the variables static so that &#039;note&#039; is the only field that gets submitted. Download count, file number  and time is fixed. Not sure if this throwing of the headers.
Any ideas?
Thank you.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing your code, this is really cool.<br />
I am having some issues implementing it thought, after running some tests I started getting errors as below.<br />
&#8212;-<br />
Warning: Cannot modify header information &#8211; headers already sent by (output started at /home/user/public_html/files/download.php:12) in /home/user/public_html/files/download.php on line 109<br />
&#8230; on line 110<br />
&#8230; on line 111<br />
&#8230; on line 112<br />
&#8212;-</p>
<p>Not sure the problem is as initially the script worked as customized.<br />
My &#8216;customization&#8217; is really only in fact that I moved the form into root index file &#8211; a folder above the &#8216;files&#8217; folder with form action being &#8216;files/index.php&#8217; and made the variables static so that &#8216;note&#8217; is the only field that gets submitted. Download count, file number  and time is fixed. Not sure if this throwing of the headers.<br />
Any ideas?<br />
Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/#comment-50541</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 12 Apr 2011 18:54:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.ardamis.com/?p=281#comment-50541</guid>
		<description>I think that download.php always uses the default maxdownloads from the config file.
Does not use the value from the mysql database.

Add $maxdownloads = $row[&#039;maxdownloads&#039;];

Either just before or after the $downloads = $row[&#039;downloads&#039;];

Thanks, works great.</description>
		<content:encoded><![CDATA[<p>I think that download.php always uses the default maxdownloads from the config file.<br />
Does not use the value from the mysql database.</p>
<p>Add $maxdownloads = $row['maxdownloads'];</p>
<p>Either just before or after the $downloads = $row['downloads'];</p>
<p>Thanks, works great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew</title>
		<link>http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/#comment-50478</link>
		<dc:creator>Drew</dc:creator>
		<pubDate>Wed, 30 Mar 2011 01:06:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.ardamis.com/?p=281#comment-50478</guid>
		<description>Thank you for this it works perfectly. I did do a little tweaking however. And for anyone who is looking to use this for OTA downloads for blackberry devices this is the header you will need to use:

[sourcecode]header(&#039;Content-Type: text/vnd.sun.j2me.app-descriptor&#039;);[/sourcecode]</description>
		<content:encoded><![CDATA[<p>Thank you for this it works perfectly. I did do a little tweaking however. And for anyone who is looking to use this for OTA downloads for blackberry devices this is the header you will need to use:</p>
<pre class="brush: plain; title: ; notranslate">header('Content-Type: text/vnd.sun.j2me.app-descriptor');</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.ardamis.com/2009/06/26/protecting-multiple-downloads-using-unique-urls/#comment-43759</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 18 Nov 2010 02:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.ardamis.com/?p=281#comment-43759</guid>
		<description>Not sure if you&#039;re checking these still, but it all works fine apart from the limit.. I can only download the file once, and then it expires.. even if i set it to any other number, it will only download it once.. any idea what this could be? Thanks</description>
		<content:encoded><![CDATA[<p>Not sure if you&#8217;re checking these still, but it all works fine apart from the limit.. I can only download the file once, and then it expires.. even if i set it to any other number, it will only download it once.. any idea what this could be? Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

