首页| 版块| 我的| 发帖| 消息
主题:关于帖子阅读页显示的ip地址来源(SQL 语句)
zhangjingyu 
看sort.php这个文件,似乎想要把ip地址对应的地理位置保存起来并调用不太容易,不过也先看看吧。
“$onlinedb = openfile(D_P.'data/bbscache/online.php');”(引用内容)这里读取了缓存文件online.php。
            } else {
                $thread['username']    = $thread[0];
                $thread['uid']        = $thread[8];
                //$thread['ip']        = $thread[2];
                //可以查看在线统计ip地址的用户组21:16 2019-1-4
                //if(in_array($groupid,array(3,4,5))){$thread['ip']=$thread[2];}else {$thread['ip']="-";}
                $thread['ip']        = in_array($groupid,array(3,4,5)) ? $thread[2] : "-";
                //$thread['ip']        = S::inArray($windid,$manager) ? $thread[2] : "-";
                $thread['group']    = $ltitle[$thread[5]];
                $thread['action']    = $thread[6];
                $thread['lasttime']    = $thread[7];
                $forum[$thread[3]]['name'] && $thread['forum'] = "".$forum[$thread[3]]['name']."";
                $thread['atc'] = $thread[4];
            }
            $threaddb[] = $thread;
        }
    }
    require_once PrintEot('sort');footer();

} elseif ($action == 'member') {这里通过online.php得到了一些信息,简单对应下,可能不太准确。
0=username
1=timestamp
2=ip
3=fid
4=tid
5=groupid
6=action
7=lasttime
8=uid

online.php文件内容简单如下:
zhangjingyu    1764990603    112.37.131.176    3    3779    3    论坛管理◇家园服务    12-06 11:10    2
zhangjingyu回帖于2025-12-06 12:12[查看电脑版]
下一页 (1/2)
下一楼»:通过搜索包含“online.php”的文件,在smallcard.php文件里有一段代码值得研究也,和遍历有关。< ..
«上一楼:http://www.vtu425.com/sort.php?action=online
在统计信息的在线统计里也可以看到ip地址, ..

查看全部回帖(200)
«返回主帖