给主题显示评论者IP的归属地及运营商信息的方法

EightPoint
EightPoint
管理员
69
文章
0
粉丝
数智软件评论152字数 170阅读0分34秒阅读模式

1、先下载作者提供的《显示评论者归属地和运营商信息+IP纯真数据库.zip》和《显示访客UA信息:Show UserAgent纯代码轻度汉化版.zip》,解压后上传主题目录下。

2、编辑 主题目录下的 functions.php 文件,添加如下代码:文章源自八点运动-https://www.8oio.com/33.html

include("ip2c/ip2c.php"); //IP归属地和运营商查询功能
include("show-useragent/show-useragent.php");  //显示访客信息

3、主题的评论回调函数位于 begin/inc/functions/comment-template.php,编辑合适位置添加:文章源自八点运动-https://www.8oio.com/33.html

<?php CID_print_comment_flag();echo ' ';CID_print_comment_browser(); echo convertip(get_comment_author_ip()); ?>

我的位置在:<strong><?php comment_author_link(); ?>:</strong>后面插入。文章源自八点运动-https://www.8oio.com/33.html

文章源自八点运动-https://www.8oio.com/33.html

 文章源自八点运动-https://www.8oio.com/33.html 文章源自八点运动-https://www.8oio.com/33.html

历史上的今天
9 月
16
 最后更新:2025-2-25
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证