Code: Select all
// Generate a signature to validate this page
$authkey = md5("[REMOVED]" . $secretkey . "[REMOVED]");
$authval = md5($HTTP_SERVER_VARS['HTTP_USER_AGENT'] . $secretkey . $HTTP_SERVER_VARS['REMOTE_ADDR']);
$timekey = md5("time" . $secretkey);
$timepad = preg_replace('/[^0-9]/', '', $HTTP_SERVER_VARS['REMOTE_ADDR']) + 0;
$timeval = time() ^ $timepad;
// Check the signature - if this is a submit which doesn't jive with the above, turn it into a preview
if ($submit && (!isset($HTTP_POST_VARS[$authkey])
|| $HTTP_POST_VARS[$authkey] != $authval
|| !isset($HTTP_POST_VARS[$timekey])
|| ($HTTP_POST_VARS[$timekey] ^ $timepad) > time() - 5))
{
$submit = false;
$preview = true;
}
Code: Select all
// Check the signature - if this is a submit which doesn't jive with the above, turn it into a preview
if ($submit && (!isset($HTTP_POST_VARS[$authkey])
|| $HTTP_POST_VARS[$authkey] != $authval
|| !isset($HTTP_POST_VARS[$timekey])
|| ($HTTP_POST_VARS[$timekey] ^ $timepad) > time() - 5))
{
$submit = false;
$preview = true;
}
rharagon wrote: Hi,
Please could someone help me to use this mod for guest, and not only for registered users.
Thanks in advance