佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 767|回复: 4

如何知道网站里连接的点击数?

[复制链接]
发表于 26-7-2006 07:28 PM | 显示全部楼层 |阅读模式
如何知道网站里连接的点击数或热门度?
回复

使用道具 举报


ADVERTISEMENT

发表于 26-7-2006 08:17 PM | 显示全部楼层
use java script !
回复

使用道具 举报

 楼主| 发表于 28-7-2006 06:19 PM | 显示全部楼层
原帖由 lEkiss 于 26-7-2006 08:17 PM 发表
use java script !


要怎么做?我没用过java啊!
我用dreamweaver
回复

使用道具 举报

Calverstine 该用户已被删除
发表于 31-7-2006 12:31 AM | 显示全部楼层
通常hosting provider都有类似的visitor counting service, 要是你不会用javascript可以打算用hosting的service.

e.g PHP counter coding:

放在<head></head>里头:

<?PHP
/***************************************************
        Name of file containing the count total.
***************************************************/
$file = "counter/counter.txt";
$open = fopen($file, "r" ) ;
$size = filesize($file);
$count = fread($open, $size) ;
fclose($open);

/***************************************************
        If cookie 'simplecount' is not set it will
        add 1 to the counter and set the cookie.
        If the cookie does exist, this section will
        be skipped.
***************************************************/
if (!isset($_COOKIE['simplecount'])) {
        $open = fopen($file, "w" ) ;
        $count++;
        fwrite($open, $count ) ;
        fclose($open);

        setcookie("simplecount","Counted!",time()+66600000);

}
?>
PHP counter 会读取counter.txt 里头的数字 在加以一,然后就会写出来( use echo $count; )。。
希望帮得到你!
回复

使用道具 举报

 楼主| 发表于 31-7-2006 09:33 AM | 显示全部楼层
原帖由 Calverstine 于 31-7-2006 12:31 AM 发表
通常hosting provider都有类似的visitor counting service, 要是你不会用javascript可以打算用hosting的service.

e.g PHP counter coding:

放在<head></head>里头:

<?PHP
/*********** ...



明天我试下!
非常感谢!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 23-9-2024 07:21 AM , Processed in 0.105884 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表