本文整理匯總了PHP中cookie::validateAuthCookie方法的典型用法代碼示例。如果您正苦於以下問題:PHP cookie::validateAuthCookie方法的具體用法?PHP cookie::validateAuthCookie怎麽用?PHP cookie::validateAuthCookie使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cookie
的用法示例。
在下文中一共展示了cookie::validateAuthCookie方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: db
<?php
session_start();
include_once 'class/class.cookie.php';
include_once 'class/class.main.php';
$db = new db();
$cookie = new cookie();
$issignup = 0;
if (!$cookie->validateAuthCookie()) {
header("Location: login.html");
die;
} else {
$ur_session = rand(0, 15);
if (!isset($_SESSION['session'])) {
$_SESSION['session'] = $ur_session;
}
if (isset($_SESSION['newcreated'])) {
if (time() - $_SESSION['newcreated'] > 0.6) {
$issignup = 0;
} else {
$issignup = 1;
}
}
}
/*
$data = '<?xml version="1.0" encoding="UTF-8"?>
<customer>
<email>robert.garlope@camrally.com</email>
</customer>';
$url = '/customers/8077961.xml'; // downgrade/downgrade delay
//$result = $connector->sendRequest($url, $format = 'xml', $method = 'PUT', $data);