C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 05-25-2009, 06:30 AM   #1
Registered User
 
Join Date: May 2009
Posts: 2
Code for Monitoring Website activities

Hi,

I want to make a daemon-like application for Linux platform which supervises the website activities. I need to fetch the URLs of all websites that are opened by the user, time of the day when it is opened & the time duration for which this url is opened and by-page activity. A code snippet will be much helpful.
Alsoo, I do not want to monitor the URLs of any specific web-browser like firefox, konqueror etc, and want a generalized solution for this problem.

Any help/ code snippet is really very appreciated.

Regards,
Manoj Kumar
manoj96067 is offline   Reply With Quote
Old 05-25-2009, 12:52 PM   #2
and the hat of Jobseeking
 
Salem's Avatar
 
Join Date: Aug 2001
Location: The edge of the known universe
Posts: 21,661
Even if they're using anonymous proxies?

And why do you think such an involved piece of work could be readily summed up with "a code snippet"?
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Salem is offline   Reply With Quote
Old 05-26-2009, 03:43 PM   #3
Jaxom's & Imriel's Dad
 
Kennedy's Avatar
 
Join Date: Aug 2006
Location: Alabama
Posts: 872
Get Squid and proxy all of your users through it. You _can_ proxy the local users too with squid.
Kennedy is offline   Reply With Quote
Old 05-26-2009, 04:07 PM   #4
Senior software engineer
 
brewbuck's Avatar
 
Join Date: Mar 2007
Location: Portland, OR
Posts: 5,758
For total browser independence, and to avoid relying on a proxy, it seems the only option is to monitor ALL outgoing TCP connections and see if the first data transmitted by the client on those connections looks like an HTTP request header.

That means you need to look for all initiated connections (SYN-ACK-ACK triples), then place the connection in a bucket to scan for HTTP activity -- once you've decided there is no HTTP activity on that connection, you can purge it from the bucket.

A "code snippet" can't possibly convey what is involved here.
__________________
"Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot
brewbuck is offline   Reply With Quote
Old 05-26-2009, 04:56 PM   #5
mastering the obvious
 
MK27's Avatar
 
Join Date: Jul 2008
Location: SE Queens
Posts: 5,148
If you haven't yet look at the pcap library. A customized packet sniffer could easily do this.

Programming with pcap
__________________

"A man can't just sit around." -- Larry Walters
MK27 is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Proposal: Code colouring Perspective General Discussions 28 05-14-2007 07:23 AM
Explain this C code in english soadlink C Programming 16 08-31-2006 12:48 AM
Updated sound engine code Bubba Game Programming 8 11-18-2004 12:38 PM
How to write/ syntax Mortgage C++ formula code needed from website jerel2k3 C++ Programming 6 04-04-2003 10:09 PM
Interface Question smog890 C Programming 11 06-03-2002 05:06 PM


All times are GMT -6. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22