Small PHP help, Deny access to a given Directory

Discussion in 'PHP' started by Yazari, Mar 17, 2007.

  1. #1
    Hello,

    I'm writting a script to organize videos.
    Videos are uploaded into a directory called /myvideos.

    What I want to do is to prohibit the directory from other IPs only Server Ip adresse could Access to it.. no direct linking for example : http://.../myvideos/1.wmv

    .. An anti leech system ..

    How ? can this be done using .htaccess files ?
     
    Yazari, Mar 17, 2007 IP
  2. Vetsin

    Vetsin Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    http://www.javascriptkit.com/howto/htaccess3.shtml
    For htaccess, requires user/password to access any file within the dir. You can also set it up to check for domain/etc from which the file was linked from to allow or disallow downloads using it.

    Also check out http://www.javascriptkit.com/howto/htaccess5.shtml and http://www.javascriptkit.com/howto/htaccess14.shtml
     
    Vetsin, Mar 17, 2007 IP