[pmwiki-users] [pmwiki-devel] ZAP shopping cart question

marc gmane at auxbuss.com
Wed Nov 8 15:05:31 CST 2006


The Editor said...
> On 11/8/06, Crisses <crisses at kinhost.org> wrote:

> > Another thing that PmWiki needs -- and it's somewhat related -- is a
> > (plug-in) method of obscuring download URLs -- so that people can't
> > get around buying a downloadable item by directly accessing the URL
> > or giving the URL out to their friends.  Or you can require people to
> > fill out a contact form before downloading your free "10 Great Ways
> > to Use PmWiki" document.  This is one place where storing downloads
> > in a database has some advantages, but there are other ways around it
> > as well.  I'd love to work that one out.

You don't need to store downloads in a database. You can obfuscate the 
download filename via a script (or simply store it outside the web 
accessible space). Simply authenticate the user, then manually write the 
headers with the mime type info, etc. and use fpassthru. That way you 
can name the real file as anything you want and provide the "real" name 
in the download URL.

Better still, fpassthru only finishes when the d/l completes, so you can 
record when a file has been successfully downloaded and block further 
access on that transaction.

-- 
Best,
Marc





More information about the pmwiki-users mailing list