Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Banned
    Join Date
    Aug 2010
    Location
    everywhere
    Posts
    63
    Thanks
    2
    Thanked 3 Times in 3 Posts

    How to create an Online Store?

    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?

  • #2
    New Coder
    Join Date
    Oct 2010
    Posts
    29
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Yes. You can store the video in a blocked folder using htaccess:
    Code:
    <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 Code:
    <?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.
    Last edited by jmace; 12-29-2010 at 06:23 AM. Reason: clarity
    PHP - MySQL - JavaScript - AJAX - HTML/XHTML/XML - CSS - Java - C++

  • #3
    New to the CF scene
    Join Date
    Jan 2011
    Location
    Seattle, WA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    @getbestproduct, are you looking to have the download expire at a certain point and/or only be accessable from a single IP address?

  • #4
    Regular Coder
    Join Date
    Mar 2010
    Posts
    294
    Thanks
    3
    Thanked 7 Times in 7 Posts
    Quote Originally Posted by getbestproduct View Post
    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?
    websitetemplates[dot]bz

  • #5
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    users Photos upload

    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

  • #6
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    creating on line movie is a good idea. it is the best way to express your self.

  • #7
    Regular Coder
    Join Date
    Jul 2009
    Posts
    186
    Thanks
    72
    Thanked 2 Times in 2 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •