1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Protecting LInks From Outside Downloads !!!

Discussion in 'Content Management' started by Mido, Dec 5, 2006.

  1. #1
    I want to protect my videos from being stoled i need to be only downloadable from my site ,dont tell me to use hotlink protection its not working at all i need it urgently i lose big ammounts of bandwidth everyday:(
     
    Mido, Dec 5, 2006 IP
  2. TheException

    TheException Banned

    Messages:
    871
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #2
    TheException, Dec 5, 2006 IP
  3. Mido

    Mido Well-Known Member

    Messages:
    1,438
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    158
    #3
    well this to protect a folder with password not to protect the inside files from being downloaded from another locations .
     
    Mido, Dec 6, 2006 IP
  4. chm3

    chm3 Active Member

    Messages:
    124
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    Why not use the HotLink Protection in the CP.
     
    chm3, Dec 7, 2006 IP
  5. Mido

    Mido Well-Known Member

    Messages:
    1,438
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    158
    #5
    i said above : ont tell me to use hotlink protection its not working at all

    i need seriuos solution
     
    Mido, Dec 7, 2006 IP
  6. TheException

    TheException Banned

    Messages:
    871
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #6
    TheException, Dec 9, 2006 IP
  7. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #7
    A couple of observations. Apache's buiolt in password protection protects everthing from a stated directory and below. If you password protect a directory, the files are also password protected as are sub directories.

    This means you can only show videos to people who have logged into your server.

    Another solution is to redirect requests for view videos through an intermediary script. PHP works. You could very simply set a variable in the files which call for the video. If that variable is set, the script will show the video. If the variable is not set, the script will not show the video. This is used by many PHP programmers to prevent files from being run directly.

    There are few things to do to make this work. In "parent" files put in something like:

    define( '_VIDEO_MIDO', 1 );

    in the file which grabs the video put something like:

    defined( '_VIDEO_MIDO' ) or die( 'Unexpected server problem' );

    In your top level .htaccess file you might put something like:

    RewriteEngine on
    RewriteRule ^(.*)\.vid$ magicmido.php?$1 [L]

    You need a line for each video extension!

    Two key lines in magicmido.php are:

    defined( '_VIDEO_MIDO' ) or die( 'Unexpected server problem' );
    ## to get rid of obvious leechers -- and --
    $query = $_SERVER["QUERY_STRING"];
    ## to get the name and path of the video requested

    magicmido.php then starts the video stream.

    Never include a link to magicmido.php -- or whatever you name the file -- in any pages displayed to users. They do not need to see under the hood.
     
    clancey, Dec 10, 2006 IP
  8. trichnosis

    trichnosis Prominent Member

    Messages:
    13,785
    Likes Received:
    333
    Best Answers:
    0
    Trophy Points:
    300
    #8
    you can edit your .htaccess file and also some hosting providers provides protection for items . you can contact with your hosting provider
     
    trichnosis, Dec 13, 2006 IP