dtm37893 2017-07-20 14:47
浏览 40

URL缩短器,包含每日使用情况和唯一点击次数等统计信息

I'm looking for coding my own PHP URL shortener. I have already built a system that knows to take a long URL, turn it into a shortened one (something like domain.com/go/URLID) and count the total click activity for it.

I want to add features like:

  1. Daily usage graph (like Google Analytics shows visitor graph in a month).
  2. Unique clicks count.

As I said, the code I made stores the total counts, but I'm not sure how to count unique clicks.

My approach for unique click counts is to use IP or cookies, but I'm not sure which one is more reliable (as cookies may expire and IP will count a full household as repeating clicks). How can I build this?

And the other part of click statistics by day: How can I do it? I was thinking about a very VERY long database table that stores every URL click, but I guess it will be too long, The queries will take time (and I have 300MB table size limit from my server provider).

I would like to get some help with the thing. I don't mind using external but free services (as long as I can use my own domain, of course).

Thanks!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 关于大棚监测的pcb板设计
    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器
    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
    • ¥15 Vue3地图和异步函数使用
    • ¥15 C++ yoloV5改写遇到的问题
    • ¥20 win11修改中文用户名路径
    • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入