Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Secure File Downloads
kvarnerexpress
post May 15 2005, 07:06 PM
Post #1


Super Member
*********

Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



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, www.site.com/file.txt 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.

Go to the top of the page
 
+Quote Post
serverph
post May 15 2005, 09:22 PM
Post #2


Ancient Enigma
Group Icon

Group: [MODERATOR]
Posts: 1,753
Joined: 11-July 04
From: under the stars
Member No.: 76



looks like you are looking for something like DreamAccount:
http://dreamcost.com/?page=dreamaccount

QUOTE
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. smile.gif
Go to the top of the page
 
+Quote Post
Tyssen
post May 15 2005, 10:36 PM
Post #3



***********

Group: Members
Posts: 1,161
Joined: 9-May 05
From: Brisbane, QLD
Member No.: 6,818



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).
Go to the top of the page
 
+Quote Post
Hamtaro
post May 16 2005, 12:46 AM
Post #4


Super Member
*********

Group: Members
Posts: 372
Joined: 14-October 04
Member No.: 1,736



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.
Go to the top of the page
 
+Quote Post
Mike
post May 21 2005, 06:37 PM
Post #5


Owner of Sub-Zero
********

Group: Members
Posts: 159
Joined: 17-November 04
Member No.: 2,325



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:

CODE


$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;
   }

?>


>_______>
Go to the top of the page
 
+Quote Post
hype
post May 30 2005, 08:24 AM
Post #6


Legend Killer
*********

Group: Members
Posts: 678
Joined: 15-April 05
From: Singapore
Member No.: 5,697



So where do we put the code? and how do we made username insert into the database?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Getting List Of Directories And Files Using Php(6)
  2. Script: Php Jukebox(4)
  3. I Need Help With File Edit In Php(6)
  4. Image Upload And File Size(2)
  5. Reading 16 Bit Wav File(0)
  6. Include File.php?id=something(13)
  7. Php File Problem(5)
  8. The Downloads On My Site(8)
  9. Logging Dowload Files From Your Server Onto A Html File(1)
  10. File String Delete?(2)
  11. Php Writes Into Txt File(8)
  12. File In Database(1)
  13. File Format Unknown! (wap)(6)
  14. Display Random File In A Directory(9)
  15. Help Needed With Directory/file Listing Code Infinite Loop(5)
  1. Help Php: How To Load String From Text File (solved)(9)
  2. Php Help Needed Including File In A Page.(2)
  3. Edit .txt File In Ftp Via Webpage(2)
  4. [php]simple Flat File Text Manipulator(3)
  5. <?php ?> Unique Visitors Script(2)
  6. File Upload(1)
  7. No File Extension(3)
  8. Php And Flash Image Gallery(5)
  9. File Checker-how To Check File Whith Html Through Html?(2)
  10. Php Downloads Script(3)
  11. Updating Php File Through A Web Form(5)
  12. Need Some Help In File Browser(8)
  13. Php Configuration File(16)


 



- Lo-Fi Version Time is now: 24th July 2008 - 12:24 PM