Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Logging Internet Traffic
Message
From
15/07/2010 01:16:20
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01472511
Message ID:
01472531
Views:
51
>>Maybe this???
>>http://zamov.online.fr/projects/netcontrol/
>>
>>>What's involved in creating a log file that tracks each web site a user visits? I'd like to do it in C#.
>>>
>>>Thanks
>
>I was hoping of doing it myself, as a learning experience.

There are 2 main ways to do this:

1. A program or service that runs on a computer you'd like to monitor

2. Configure a router to log site visits. This can let you track site visits for everyone; you can narrow it down to the one(s) you want.

If you're interested in option 1, I can't help you. I don't like that one in general because a savvy user can kill your process or service and it just feels too much like spyware.

I implemented option 2 for an accounting firm that wanted to make sure their accountants were using the web for business use only. It required 3 pieces of software:

1. Logging software on the router. Most routers these days (even $50 ones) implement a log protocol, often syslogd, although it's usually disabled by default. Since routers typically don't have a lot of log file space, when you turn on logging you specify another computer (by its IP address) to receive and store the syslog messages.

2. Software that receives messages generated by the router, and stores them. Typically you install this on an existing server computer. You'll probably need the sysadmin's help for this. I used the free Kiwi Syslog Daemon. In my case I configured it to save the messages in text files. Other versions can save directly to a SQL database.

3. Software to analyze the log files or log database. In my case I wrote custom software in VFP.

If you want to go this route, you won't be able to change the router software, you'll have to use whatever the router gives you. Some routers allow firmware upgrades that give more or improved functionality, if you have one you could look into that if the default router log options aren't good enough.

If you want, you could write your own syslog server to receive and store the messages. I'm not sure you'd want to reinvent the wheel, when there are solid, free products like Kiwi Syslog available.

You can certainly write your own software to analyze the log files. There may also be free or low-cost log analysis tools already available.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform