网站当前的在线人数
来源:互联网 发布:免费刷cf点软件 编辑:程序博客网 时间:2024/04/30 04:48
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
gb_temp表:
temp1 用户ID
temp2 流览IP地址
temp3 online//做了个标记,因为其他功能也要使用这个表
temp4 登陆时间
$onlinetime最长离线时间分钟
db_class是我定义的一个数据库操作类。
///////////////////
//在线统计
$db = new db_class;
$db->connect();
$limit_time = time() - ($onlinetime * 60);
$online_time = time();
$db->query("delete from gb_temp where (temp4<$limit_time or temp2='$ip') and temp1='$id' and temp3='online'"); //删除离线$onlinetime分钟的用户
$db->query("insert into gb_temp (temp1,temp2,temp3,temp4) values ('$id','$ip','online','$online_time')");
$onres = $db->query("select count(*) from gb_temp where temp1='$id' and temp3='online'");
$onlineuser = $db->fetch_array($onres);
$onlineuser = $onlineuser[0]; 转自:动态网制作指南 www.knowsky.com<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
这是我的多用户统计的在线统计部分 gb_temp表:
temp1 用户ID
temp2 流览IP地址
temp3 online//做了个标记,因为其他功能也要使用这个表
temp4 登陆时间
$onlinetime最长离线时间分钟
db_class是我定义的一个数据库操作类。
///////////////////
//在线统计
$db = new db_class;
$db->connect();
$limit_time = time() - ($onlinetime * 60);
$online_time = time();
$db->query("delete from gb_temp where (temp4<$limit_time or temp2='$ip') and temp1='$id' and temp3='online'"); //删除离线$onlinetime分钟的用户
$db->query("insert into gb_temp (temp1,temp2,temp3,temp4) values ('$id','$ip','online','$online_time')");
$onres = $db->query("select count(*) from gb_temp where temp1='$id' and temp3='online'");
$onlineuser = $db->fetch_array($onres);
$onlineuser = $onlineuser[0]; 转自:动态网制作指南 www.knowsky.com<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 网站当前的在线人数
- 统计网站的在线人数
- 注册的在线人数/统计在线人数/网站总访问量
- php获取当前在线人数的方法
- 统计当前在线人数
- JSP使用HttpSessionListener监听器 监控当前网站在线人数
- 使用HttpSessionListener监听器 监控当前网站在线人数
- 网站的在线人数的统计
- 网站在线人数以及历史访问人数的统计代码
- 网站在线人数以及历史访问人数的统计代码
- 网站在线人数以及历史访问人数的统计代码
- 简单的网站在线人数统计
- Session的监听,统计网站在线人数
- 如何统计网站的在线人数呢?
- 统计网站在线人数
- 统计网站 在线人数
- 统计网站在线人数
- 统计网站在线人数
- 利齿C sharp代替C++?
- 建立文件交换功能的脚本(一)
- 使用基本类库 -- zt 统一教学网
- 一个用php3编写的简单计数器
- Numeric Parse Method
- 网站当前的在线人数
- 数值变换时的格式化字符举例
- 最简单的PHP程序--记数器
- 日期和时间的转换
- BBS(php & mysql)完整版(一)
- 用C#创建COM对象
- 建立动态的WML站点(三)
- C# 2.0 Specification(迭代器)(一)
- 用文本文件制作留言板提示(下)