php 设置cookie高级用法
php 设置cookie高级用法
function getvis(&$pagesid,&$retime) {
global $err,$conf,$HTTP_COOKIE_VARS,$_COOKIE;
if(isset($_COOKIE['ant'])) $cot=$_COOKIE['ant'];
elseif(isset($HTTP_COOKIE_VARS['ant'])) $cot=$HTTP_COOKIE_VARS['ant'];
else $cot='';
$cos=preg_split("/x/",$cot);
$max=sizeof($cos);
for($c=0;$c
if(strlen($cos[$c])==10) {
$id=substr($cos[$c],0,2);
eval("$id=0x$id;");
$anct[$id]=$cos[$c];
}
}
if(isset($_COOKIE['anm'])) $com=$_COOKIE['anm'];
elseif(isset($HTTP_COOKIE_VARS['anm'])) $com=$HTTP_COOKIE_VARS['anm'];
else $com='';
$cos=preg_split("/x/",$com);
$max=sizeof($cos);
for($c=0;$c
if(strlen($cos[$c])==10) {
$id=substr($cos[$c],0,2);
eval("$id=0x$id;");
$tim=substr($cos[$c],2,8);
eval("$tim=0x$tim;");
if($tim>=$conf->mtime) $ancm[$id]=$cos[$c];
}
}
if(isset($_COOKIE['anw'])) $cow=$_COOKIE['anw'];
elseif(isset($HTTP_COOKIE_VARS['anw'])) $cow=$HTTP_COOKIE_VARS['anw'];
else $cow='';
$cos=preg_split("/x/",$cow);
$max=sizeof($cos);
for($c=0;$c
if(strlen($cos[$c])==10) {
$id=substr($cos[$c],0,2);
eval("$id=0x$id;");
$tim=substr($cos[$c],2,8);
eval("$tim=0x$tim;");
if($tim>=$conf->wtime) $ancw[$id]=$cos[$c];
}
}
if(isset($_COOKIE['an1'])) $co1=$_COOKIE['an1'];
elseif(isset($HTTP_COOKIE_VARS['an1'])) $co1=$HTTP_COOKIE_VARS['an1'];
else $co1='';
$cos=preg_split("/x/",$co1);
$max=sizeof($cos);
for($c=0;$c
if(strlen($cos[$c])==10) {
$id=substr($cos[$c],0,2);
eval("$id=0x$id;");
$tim=substr($cos[$c],2,8);
eval("$tim=0x$tim;");
if($tim>=$conf->dtime) $anc1[$id]=$cos[$c];
}
}
//current time in HEX
if($conf->ctime>0x7FFFFFFF) {
$t1=$conf->ctime/16;
$t2=$conf->ctime&0xF;
$ctimestr=sprintf("%07X%01X",$t1,$t2);
}
else {
$ctimestr=sprintf("%08X",$conf->ctime);
}
reset($pagesid);
while($e=each($pagesid)) {
$k=$e[0];
if(isset($anct[$k])) {
$pagesid[$k].='|0';
if(strlen($anct[$k])==10) {
$tim=substr($anct[$k],2,8);
eval("$tim=0x$tim;");
$retime[$k]=$tim;
}
}
else {
$pagesid[$k].='|1';
$anct[$k]=sprintf("%02X%s",$k,$ctimestr);
}
if(isset($ancm[$k])) $pagesid[$k].='|0';
else {
$pagesid[$k].='|1';
$ancm[$k]=sprintf("%02X%s",$k,$ctimestr);
}
if(isset($ancw[$k])) $pagesid[$k].='|0';
else {
$pagesid[$k].='|1';
$ancw[$k]=sprintf("%02X%s",$k,$ctimestr);
}
if(isset($anc1[$k])) $pagesid[$k].='|0';
else {
$pagesid[$k].='|1';
$anc1[$k]=sprintf("%02X%s",$k,$ctimestr);
}
}
$cot=join('x',$anct);
$com=join('x',$ancm);
$cow=join('x',$ancw);
$co1=join('x',$anc1);
//get path
$path=$conf->url;
$path=preg_replace("/^(http://)([^/]+)/i",'',$path);
$path.='aa.php';
//set cookie
SetCookie('ant',$cot,time()+($conf->time1*3000),$path);
SetCookie('anm',$com,time()+($conf->time1*31),$path);
SetCookie('anw',$cow,time()+($conf->time1*7),$path);
SetCookie('an1',$co1,time()+$conf->time1,$path);
}

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The way to update ByBit exchanges varies by platform and device: Mobile: Check for updates and install in the app store. Desktop Client: Check for updates in the Help menu and install automatically. Web page: You need to manually access the official website for updates. Failure to update the exchange can lead to security vulnerabilities, functional limitations, compatibility issues and reduced transaction execution efficiency.

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

The official website entrance of the Coinsuper Exchange: https://www.coinsuper.com. The client download channels are: Windows client, macOS client, and mobile (iOS/Android). Registration requires an email, mobile phone number and password, and you need to complete real-name authentication before you can trade. The platform provides a variety of digital asset transactions, including Bitcoin, Ethereum, etc., with the transaction fee rate of 0.1% for both orders and acceptors. Security safeguards include cold wallet storage, dual-factor verification, anti-money laundering and anti-terrorism financing measures, and with security public

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

Web3, as a new stage of the Internet, is built on the decentralization of blockchain. As the underlying architecture of Web3, the public chain provides a secure and transparent data recording and management method. Among them, Ethereum has attracted much attention for its smart contract platform, while Binance Smart Chain is known for its high performance and low-cost transactions. Polkadot is a multi-chain network that facilitates connections and communications between blockchains. Solana is known for its fast scalable transactions, while Cardano is recognized for its academically-backed security and scalability.

Ouyi, also known as OKX, is a world-leading cryptocurrency trading platform. The article provides a download portal for Ouyi's official installation package, which facilitates users to install Ouyi client on different devices. This installation package supports Windows, Mac, Android and iOS systems. Users can choose the corresponding version to download according to their device type. After the installation is completed, users can register or log in to the Ouyi account, start trading cryptocurrencies and enjoy other services provided by the platform.

Altius, a crypto startup, recently announced a $11 million financing round led by FoundersFund and Pantera Capital. It is remarkable that Altius only posted one tweet before the announcement of the financing news, which added a sense of mystery to it. What exactly attracts top venture capital institutions such as Pantera Capital? The answer lies in Altius' innovative reshaping of the blockchain execution layer. Altius is not a traditional single public chain project. It is committed to building a modular, plug-and-play execution layer solution - AltiusStack. This solution can be seamlessly integrated with any public chain using virtual machine (VM) mechanism

Signs of recovery in the NFT market! Mocaverse floor price soared, with a 24-hour increase of up to 79%. According to OpenSea data, the floor price of the well-known NFT project Mocaverse has recently exceeded 2.9ETH, and the current price is 2.96ETH (approximately US$11,860), with an astonishing 24-hour increase of 79%, reaching a maximum of 3.49ETH. This significant growth has attracted widespread attention from the market. Will the NFT market return to its bull market? Mocaverse Floor Price Chart NFT sector leads the crypto market Coingecko data shows that the overall crypto market has risen in the past 24 hours, while the NFT sector tops the list with an increase of 8.53%. Some projects are particularly good
