Count Number of Clicks on a link (Without onclick)(计算链接上的点击次数(没有 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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:计算链接上的点击次数(没有 onclick)
基础教程推荐
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 如何替换eregi() 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
