if i am understanding correctly, it will be out of the forum directory?
if so use this:
PHP Code:
chdir(fullpathtoforums);
now your full path to your forums maybe something like this:
/home/frandy/public_html/forums/
if you are not sure, make a new php file executing this:
PHP Code:
echo "My path info is:" . getcwd();
upload that file to your forum directory and run it, this will echo your file path of your forum directory.
copy that and place it in the chdir() function. then for easy access to vb variables and the database vbulletin uses just require_once() global.php, like so:
PHP Code:
chdir(fullpathtoforums);
require_once('./global.php');
then if you need access files in the same directory as your new script
simply run this:
PHP Code:
chdir(getcwd());
and then include files from your current directory.
more info on chdir() and getcwd():