Hi there
I have created a simple script that is a login form for vbulletin 4.
I was using the variables available when including global.php but this didn't work on some of my pages as I couldn't set the include directory since it was already set by another CMS system. eg chdir($_SERVER['DOCUMENT_ROOT'] . '/forums');
So instead I manually connected to the vb database and got the session and user details. The only thing I can't get is the logouthash variable.
logouthash is defined in the /includes/functions.php -
PHP Code:
$user['securitytoken_raw'] = sha1($user['userid'] . sha1($user['salt']) . sha1(COOKIE_SALT));
$user['securitytoken'] = TIMENOW . '-' . sha1(TIMENOW . $user['securitytoken_raw']);
$user['logouthash'] =& $user['securitytoken'];
I can get the userid and salt from the database and I can define COOKIE_SALT myself to match whats in /includes/functions.php but the variable that is difficult is TIMENOW.
Is TIMENOW the same as time()?
I find if I echo TIMENOW its not the same as time() and it changes all the time?
How should I define TIMENOW or is there a better way to do this whole thing?