当用户访问网站时创建日志 [英] create log as user visit web sites

查看:73
本文介绍了当用户访问网站时创建日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用带有Windows服务的sqlserver创建日志
或可能是其他东西.

我的问题是
当用户访问其他网站时,我要为其创建日志

假设1个用户访问yahoo.com然后hotmail.com然后google等

我的日志就是这样

I want to create log using sqlserver with " windows services
or may be some thing else.

my issue is
as user visit different web sites i want to create log for it

suppose 1 user visit yahoo.com then hotmail.com then google and so on

my log would be like this

sno   user id     site visit     datetime                browser
----  -------     ---------       -----
1      xyz         yahoo.com      12/12/2011 3:40:5       ie
2      xyz         hotmail.com    12/12/2011 3:45:15      ie
3      xyz         google .com    12/12/2011 4:45:15      ie




请告知我们可以通过提供窗口服务来做到这一点吗?
该怎么做
感谢Advance




kindly let me know can we do this by making window service ?
how to done this
thanks in Advance

推荐答案

这是代理服务器的作用.您的客户端网络连接将通过此代理服务器与Internet隔离.没有它们,他们将无法上网.他们的浏览器将配置为使用此服务器来获取网页.然后,代理必须有机会记录任何人访问的每个URL.

由于网页几乎绝不会是一个请求和响应,而是由许多不同的URL,请求和响应组成,因此您将记录更多您认为的URL.

如果您不知道如何编码TcpServer/Client,那么最好的选择就是购买商用代理服务器.否则,您将花费大量的时间来学习Tcp服务器编程的内容,并想出可以满足您需求但又性能稳定的东西.
This is what a proxy server is for. Your clients network connection would be insulated from the internet by this proxy server. They cannot get out to the internet without it. Their browsers would be configured to use this server to go get web pages. The proxy then has to opportunity to log every single URL visited by anyone.

Since a web page is just about never a single request and response, but made up of many different URLs, requests and responses, you''ll be logging more URLs that you think.

If you don''t have any idea how to code TcpServer/Clients, your best bet would be to get a commerical proxy server off-the-shelf. Otherwise, it''ll take you an extraordinary amount of time to learn the in''s and out''s of Tcp server programming and coming up with something that does what you want but also is performant and stable.


如何运行fiddler2,然后获取日志并更新您的数据库
how about running fiddler2 and then take the logs and update your db


这篇关于当用户访问网站时创建日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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