douxun1934 2012-10-09 11:25
浏览 72
已采纳

如何使用php将apache请求的url保存到数据库中?

I wanted to save the requested urls of my website in to a table in database.

For example if user1 requests the url myserver.com/images/header.png, the below record should be saved in to database.

id    user    requested_url
1     user1   /images/header.png

EDIT: My main problem is how to know the requested Urls and pass them to a php file!

  • 写回答

4条回答 默认 最新

  • doutang3077 2012-10-09 11:30
    关注

    Have a look at Apaches' mod_log_mysql or mod_log_sql. They will allow you to forward apache logs to SQL servers.

    Readup:

    http://onlamp.com/pub/a/apache/2005/02/10/database_logs.html?page=2

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作