...

View Full Version : How to create an Online Store?



getbestproduct
12-28-2010, 10:15 AM
Hi there, is there anyway to create an online store where people can purchase a video, and then have that video "unlocked" and added into their account, where they can access them in the future by logging in?

jmace
12-29-2010, 06:16 AM
Yes. You can store the video in a blocked folder using htaccess:


<Directory /path/to/diretcory>
order allow, deny
deny from all
<Directory>

(this keeps everyone from accessing the folder's contents)

And then have PHP or a similar language pull the file and send it out if the user has permission to view it. For example:

<?php
//check to see if the user can access the file
if($permission != true) die('You cannot access this file.');
//If so, send the file with something like:
header('Content-disposition: attachment; filename='.$filename);
header('Content-type: '.$type);
header('Content-Length: ' . filesize($file));
file($file);
?>
Permissions can be stored in a MySQL database.

SeattleWebsites
01-03-2011, 07:07 PM
@getbestproduct, are you looking to have the download expire at a certain point and/or only be accessable from a single IP address?

bestdeveloper
01-04-2011, 06:34 AM
Hi there, is there anyway to create an online store where people can purchase a video, and then have that video "unlocked" and added into their account, where they can access them in the future by logging in?
do you want to create yourself or do you want to find someone for this job?

roder12
01-24-2011, 12:03 AM
Hi:
every one

starting a online photo template store, what is the code i would use for my users to upload there photos, to specific templates, ( for example a certain empty space on a template) i have created with varying sizes, once uploaded, they could download the finish product.I would sincerely appreciate it .
Thanks a million
rodger

provaltech
01-31-2011, 07:21 AM
creating on line movie is a good idea. it is the best way to express your self.

skcin7
01-31-2011, 07:36 PM
I think the best way to do it is with PHP and SQL. Store a table which contains links to all of the movies in the SQL database. Then store another table which contains a list of videos that a user purchased. The 2nd table would contain a userid and the corresponding videoid that he purchased. It could also store information such as purchase date, IP address, and other information for security reasons. This method would also need to have a user table, and the entire website would have to allow your users to login (which is a pain in the butt to learn how to do, if you've never programmed a register/login system before). I am not sure why this question was posted in Graphics and Multimedia discussions. It seems to me more like a general web application implementation question.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum