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

查看:23
本文介绍了计算链接上的点击次数(没有 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 在您点击其中一个站外链接时使用的那种东西.

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天全站免登陆