计算链接的点击次数(无onclick) [英] Count Number of Clicks on a link (Without onclick)

查看:72
本文介绍了计算链接的点击次数(无onclick)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有诸如此类的链接

"""<a href="http://xyz.com/pz/jjjjj/"><img src="http://xyzsho/mbd.com/42/1319/11110/" alt="" border="0"></a>""""

存储在mysql数据库中.用户从其他网站复制这些链接,并将其上传到数据库.这些链接现在将显示在我们的网站上.如何计算和存储每个链接的点击次数.在这里,我无法使用onclick.

stored in a mysql database. The user copies these links from some other website and uploads it to the database. These links are now to be displayed on our site. How can I count and store the number of clicks on each link. Here i am unable to use onclick.

我正在使用PHP和MySQL.

I am using PHP and MySQL.

谢谢

推荐答案

您需要重写URL才能首先访问可用于统计信息收集的其他服务器,然后将用户重定向到其初始URL.

You need to rewrite the URL to first hit some other server you can use for statistics gathering, and then redirect the user to their initial URL.

这是每当您单击Twitter或Facebook的脱机链接之一时,Twitter或Facebook就会使用的东西.

This is the sort of thing used by Twitter or Facebook any time you click one of their off-site links.

本质上,您是在编写URL缩短器.

Essentially, you're writing a URL shortener.

这篇关于计算链接的点击次数(无onclick)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆