Jump to content
xisto Community
kvarnerexpress

Secure File Downloads

Recommended Posts

Hey guys,I'm looking to offer files for download, but only after a customer has purchased it. What this means is, a file cannot be downloaded by anyone at any time, except the user whose transaction has been approved. The catch is that the file has to remain on the server at all times to be available for download.It would be like this:1) Prior to a transaction, https://www.salesforce.com/products/platform/overview/ would be inaccessible for download / viewing / etc. by anyone.2) After the transaction is authorized, file.txt is available for download ONLY by that specific user. 3) After the download of file.txt is complete, file.txt is no longer available to that specific user (or anyone else).Is there any secure, fool-proof way of going about this? It's very important that the file is exclusively available to the purchasing user, and prior / post-transaction, the file is not available.Any / all suggestions would be greatly appreciated, as this matter is of major concern to me.

Share this post


Link to post
Share on other sites

looks like you are looking for something like DreamAccount: https://github.com/tony-landis/agilebill?page=dreamaccount

 


DreamAccount can be used to protect ANY type of web content or download. DreamAccount has been used by some of our clients to manage access to the following types of subscriptions and membership web sites: - Any HTML, PHP, PERL/CGI, JAVASCRIPT, etc. - Images, Videos, PDF Files, Word Files, Zip Downloads, etc. - Forums and Bulletin Boards (vBulletin, phpBB, Invision Board, YaBBSE) - Portals and CMS (PostNuke, Mambo, Geeklog, phpNuke) - Blogging (pMachine) - Webblogging programs (pMachine, etc.) - Ticket and Customer Support Systems. - Dating/Matchmaking Services. - E-mail Services (SquirrelMail, etc.) - News Services. - E-Books and Informational/Educational Services. - Misc. Downloadable Products.


 

it is being phased out, since it has since evolved into a more integrated system (now known as "AgileBill" with a "Content Protection module" -- more info: http://www.agilebill.com/sales/htaccess/. the downside is, it is not free. you may want to search also for "Membership Client Pro", "aMember Pro", "Locked Area Pro", and "Account Manager Pro", which competes directly with DreamAccount. if you really want secure downloads, you may want to consider investing in a tried and tested script. if i get wind of something like this as freeware, i will post it here. :lol:


Share this post


Link to post
Share on other sites

This probably won't help you too much cos it's in ASP but the shopping cart we use for our company (VP-ASP) offers the exact sort of secure download feature you're talking about. So there's probably PHP shopping carts available that offer the same thing (dunno how free or otherwise they might be though).

Share this post


Link to post
Share on other sites

Well, Cpanel has a shopping cart you can install. I don't know if it's exactly what you're looking for. I've never tried it. Also, I have no idea at all, but it may be written in PHP. I also don't know how secure it is, but, still, it may be worth a shot. I hope I helped you somewhat.

Share this post


Link to post
Share on other sites

That would be kinda strange, why would somebody pay for something to download off of the Internet? I could probably make a script using PHP and MySQL, except I'm feeling pretty lazy right about now. >_>; Just make something involving users with tables holding the downloads and stuff. Then make a field named 'purchased' and make it insert the peoples usernames as they buy it. Then put something like:

$purchased = mysql_query("SELECT purchased FROM items WHERE itemid='{$_GET['itemid']}'") or die(mysql_error());$purchasedby = explode('|',$purchased);if (in_array('$username',$purchasedby)) {    $file = '/home/[b]CPANELUSERNAME[/b]/public_html/[b]FILENAME[/b].[b]FILEEXTENSION[/b]';    header('Content-Description: File Transfer');    header('Content-Type: application/force-download');    header('Content-Length: ' . filesize($file));    header('Content-Disposition: attachment; filename=' . basename($file));     } else {        echo 'You must purchase this item before downloading!';        exit;    }?>

>_______>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.