Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-14-2007, 07:11 PM
WebProWorld New Member
 

Join Date: Jun 2007
Posts: 4
davss RepRank 0
Default Sale of dynamic content and securing mp3, pdf files [PHP/mySQL]

Hi all,

This is quite big (maybe too big for my skills) hence am asking for your help/opinions on the logic and what's the best way to code this.

Basically I am to develop a website which sells language lessons in mp3 and extras in pdf. Visitors will be able to register and buy: single lessons, extras, packages built from those lessons at a more attractive price or monthly subscription. The last one will give access to all content from the date of purchase to when it expires.

Modules required:
- secure area for admins and newly signed up users
- mini CMS
- shopping cart with express paypal check out
- forum
- live chat


Problems to resolve:

1) How to secure files on the server so only after purchase are available in user accounts?
a) secure all files from all guests
- thought of using a secure folder on my server

b) make available purchased files for a user account
- field in mySQL database

c) restrict access to files outside subscription i.e. only those from start to end date are available.

d) make newly posted files available in iTunes via RSS/XML file
- At the moment we have been creating accounts to a secure folder on our server for people using iTunes. The are provided with a link to an xml file.

Many thanks in advance
David
Reply With Quote
  #2 (permalink)  
Old 06-14-2007, 07:41 PM
WebProWorld Member
 

Join Date: Oct 2005
Posts: 39
niggles RepRank 1
Default Re: Sale of dynamic content and securing mp3, pdf files [PHP/mySQL]

Hi,

To provide only the relevant links to someone, you're going to have to create their links on the fly and link them through some download script rather than directly to the PDF or MP3 e.g.

download.php?customer=customer_id&filename=databas e_id

You can use this to check that they're a valid customer and/or have a right to download a file and if so, then serve up the content.

PHP: Hypertext Preprocessor has examples of how to change the header content to allow this e.g.

<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');

// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');

// The PDF source is in original.pdf
readfile('original.pdf');
?>

This way no one can actually link to the files or share links etc as the files are only made accessible when they've been called through a valid link and session.

Cheers,
Niggle
__________________
-------------------------------------------------
World Music World - bringing the World's Folk Music Cultures Together
http://www.worldmusicworld.com/
-------------------------------------------------
Reply With Quote
  #3 (permalink)  
Old 06-15-2007, 01:52 PM
WebProWorld New Member
 

Join Date: Jun 2007
Posts: 4
davss RepRank 0
Default Re: Sale of dynamic content and securing mp3, pdf files [PHP/mySQL]

Thanks Niggle.

If I am correct this is covered by a tutorial at How to protect PDF files using PHP ?

Last edited by davss : 06-15-2007 at 02:26 PM.
Reply With Quote
  #4 (permalink)  
Old 06-17-2007, 07:39 PM
WebProWorld Member
 

Join Date: Oct 2005
Posts: 39
niggles RepRank 1
Default Re: Sale of dynamic content and securing mp3, pdf files [PHP/mySQL]

Hi,

Yep, that's the sort of thing.

Cheers,
Niggles
__________________
-------------------------------------------------
World Music World - bringing the World's Folk Music Cultures Together
http://www.worldmusicworld.com/
-------------------------------------------------
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , , , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Video & voice files - MYSQL JuniorOnline Database Discussion Forum 4 10-24-2006 12:54 PM
Fully dynamic content and SEO - going from static to dynamic microlures Search Engine Optimization Forum 2 10-01-2005 02:27 AM
JAAS, Securing J2EE Applications: Securing Web Components WPW_Feedbot Graphics & Design Discussion Forum 0 08-19-2005 12:37 AM
PHP MySQL Multiple Column Dynamic Dropdown Chris W.P. Web Programming Discussion Forum 0 08-19-2004 01:34 PM
PHP and dynamic .htpassword files DOA Web Programming Discussion Forum 3 06-24-2004 03:37 AM


Search Engine Optimization by vBSEO 3.2.0