IP-checking with .htpasswd for media files?

Discussion in 'Setting-up protection' started by joioneke2, Feb 19, 2006.

  1. joioneke2

    joioneke2 New Member

    Joined:
    Feb 19, 2006
    Messages:
    1
    I wanted to know if there was a way to set up IP checking for a directory with media files in them (like .jpg, .psd and .wmv files) that has no php or html files in it.

    I read this already:

    Setting up IP-Checking with .htpasswd

    aMember PRO version contains ability to check username/login sharing. If there is more than 5 log-ins (from different IP) during 24 hours with the same username, member account will be automatically locked. IP-Checking works automatically if you are using php_include protect plugin. But it is possible and very recommended to setup IP-protection for your static pages too. To do that, you must create in each your protected directory php file, named log_access.php with following content:

    <?
    include "/home/user/public_html/amember/log_access.inc.php";
    ?>

    When user access this file, aMember script automatically write log record and do IP checking. To make this file called automatically, you must insert in your protected HTML pages following code:

    <script src="log_access.inc.php"></script>

    or

    <img src="log_access.inc.php" width=1 height=1>

    Of course, above you must enter your directory names and URLs.​

    Am I not understanding it correctly? Or is there not a way to do IP-checking for a directory with no php files or html files in them?
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Just use new_rewrite protection and it's all.

Share This Page