Announcement

Collapse
No announcement yet.

protect my downloadable files, please help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • protect my downloadable files, please help

    What is the best way to protect my downloadable files using php?

    it is easier with .htaccess where set this to a folder and all your files are protected, but now with php i need something like:

    (1) check vB DB for username/password
    (2) if username/password are correct go and download the file
    (3) and maybe something like a simple statistics to sort downloads for each user.

    Your help is greatly appreciated.

    Thanks in advance

  • #2
    i'm using this code to protect php pages, but does anyone know how can i configure this to work for the downloadable files as well?

    PHP Code:
    <?php

    chdir
    ($DOCUMENT_ROOT "/forums");
    require(
    $DOCUMENT_ROOT ."/forums/global.php");

    if (
    $bbuserinfo['userid']==0) {
    eval(
    "standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
    }
    else
    {
    $username=$bbuserinfo['username'];

    if (
    $bbuserinfo['value']!='') {
    if (
    $bbuserinfo['value2']!=''){ $variable=$bbuserinfo['value2'];}

    }

    }

    ?>
    please help

    Thanks

    Comment


    • #3
      Yeah could do with this...
      Simple Straight Forward EU cPanel vBulletin Web Hosting Provider.

      Comment


      • #4
        WEBDosser, the downloadable files are not protected with this code, only php pages, do you how can i hack it to make it work for my downloads.

        i.e when someone tries to download a file, the file is not protected and can be downloaded.


        thanks

        Comment

        Loading...
        Working...
        X