简单的cookie计数器实现源码
2015-01-24信息快讯网
本篇文章是对一个简单的cookie计数器的实现源码进行了详细的分析介绍,需要的朋友参考下
<?php if (!empty ($_COOKIE['example'] ))
$example = ++$_COOKIE['example'] ;
else $example = 1 ;
setcookie("example",$example,time()+54000);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>简单的COOKIE计数器</title>
<style type="text/css">
<!--
.style1 {
font-size: 14px;
font-family: "华文琥珀";
}
.style2 {
font-size: 25px;
font-family: "华文行楷";
}
.style3 {
font-size: 13px;
font-family: "华文琥珀";
}
-->
</style>
</head>
<body>
<table width="350" height="208" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="images/136.JPG">
<table width="240" height="208" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" align="center" class="style2"> </td>
</tr>
<tr>
<td height="25" align="center" class="style2">欢迎光临</td>
</tr>
<tr>
<td height="30" align="center" valign="top">
<span class="style1">本页已经被访问:</span>
<span class="style2"> <?php echo "$example";?>次</span>
</td>
</tr>
<tr>
<td height="18" align="center" valign="top">
<span class="style3">简单的COOKIE计数器</span>
</td>
</tr>
<tr>
<td height="30" align="center"> </td>
</tr>
</table> </td>
</tr>
</table>
</body>
</html>
CodeIgniter生成网站sitemap地图的方法
php file_get_contents抓取Gzip网页乱码的三种解决方法
CodeIgniter使用phpcms模板引擎
CodeIgniter基本配置详细介绍
php cookie使用方法学习笔记分享
PHP CURL获取cookies模拟登录的方法
新手菜鸟必读:session与cookie的区别
怎样使用php与jquery设置和读取cookies
深入解析Session是否必须依赖Cookie
解析php中call_user_func_array的作用
深入eAccelerator与memcached的区别详解
探讨多键值cookie(php中cookie存取数组)的详解
深入理解:单一入口、MVC、ORM、CURD、ActiveRecord概念
PHP CodeBase:将时间显示为"刚刚""n分钟/小时前"的方法详解
探讨file_get_contents与curl效率及稳定性的分析
PHP Cookie的使用教程详解
setcookie中Cannot modify header information-headers already sent by错误的解决方法详解
LotusPhp笔记之:Cookie组件的使用详解
在PHP中设置、使用、删除Cookie的解决方法