Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// #############################################################################
/**
* Sets a cookie based on vBulletin environmental settings
*
* @param string Cookie name
* @param mixed Value to store in the cookie
* @param boolean If true, do not set an expiry date for the cookie
* @param boolean Allow secure cookies (SSL)
* @param boolean Set 'httponly' for cookies in supported browsers
*/
function vbsetcookie($name, $value = '', $permanent = true, $allowsecure = true, $httponly = false)
) nhưng em ko hiểu sao, khi em copy link của script vào thủ công thì nó tạo được, còn khi include như 1 cái ảnh thì ko được)no set cho any domain (current)
define('SESSION_BYPASS', 1);
define('LOCATION_BYPASS', 1);
define('SKIP_SESSIONCREATE', 1);
define('THIS_SCRIPT', 'ces_xs_cookies');
$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();
chdir(dirname(__FILE__) . "/..");
require_once('./global.php');
require_once('./includes/functions_login.php');
require_once('./includes/adminfunctions.php');
// had to move main function
// or it stops working if bbactive = 0
if ($vbulletin->options['ces_cookie_debug'])
{
echo $vbphrase['ces_cookie_complete'];
}
else
{
// return cleargif
$filedata = base64_decode('R0lGODlhAQABAIAAAMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
$filesize = strlen($filedata);
header('Content-type: image/gif');
if (!(strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false AND strpos(SAPI_NAME, 'cgi') !== false))
{
header('Content-Length: ' . $filesize);
header('Connection: Close');
}
echo $filedata;
}
flush();
// #############################################################################
/**
* Calls PHP's setcookie() or sends raw headers if 'httponly' is required.
* Should really only be called through vbsetcookie()
*
* @param string Name
* @param string Value
* @param int Expire
* @param string Path
* @param string Domain
* @param boolean Secure
* @param boolean HTTP only - see http://msdn.microsoft.com/workshop/author/dhtml/httponly_cookies.asp
*
* @return boolean True on success
*/
function exec_vbsetcookie($name, $value, $expires, $path = '', $domain = '', $secure = false, $httponly = false)
setcookie("bbsessionhash", $value, time()+3600, "/", ".hn-ams.net");