Quote:
Originally Posted by dpakman91
alright, hopefully someone can help me with this:
i have some large files i want to make available to certain usergroups, but not other. the files are way too large to upload as "attachments" with vb so i would have to upload them via ftp and then just post a link in a thread...of course this means the only way to prevent people from downloading it is to prevent them from seeing the thread at all, which is not my intention.
with this new way of making a vb page, is there any way to do what i am trying to do?
any help would be great.
|
Try something like:
PHP Code:
<?php
require_once('./global.php');
if ($_REQUEST[filename])
{
if ($bbuserinfo[usergroupid] == 6)
{
header("Location: $_REQUEST[filename]");
}
}
?>
Be sure to change the path to the global.php and the usergroupid as well (currently it's 6 for admins only).
Also, save this code in a file such as download.php and then you can use the file by linking to it like
http://www.example.com/forum/downloa...=something.php which will download
www.examlpe.com/forum/files/something.php if the user is an administrator.