HalfEvil
HalfEvil

Reputation: 113

Visual C++ Best way to monitor visited websites?

My program needs to monitor all websites that are visited when the program runs.

I've been found some ways to do it and I'm wondering which way thats "best" (with best I mean, easiest to implement and offering the best performance). The program is to newer versions of windows only! It should work on both x86 and x64. The browsers that I need to be able to monitor is IE, FireFox, Chrome and Opera.

I could watch the history files of each browser, but this would be a pretty bad way to do it (newer versions of the browser could make the code stop working etc)

I could check every window (HWND) and see if its a browser that visits a website... But is this really a good way to do it? If so how to I do it? Links or code snippets thanks :)

I could use a packet sniffer, but that would be kinda overkill if I just want the urls...

A proxy wouldn't be a good solution (Am I right?) because it would slow the browsing down (I think so at least)...

Or could I do it some other way thats better?

Upvotes: 1

Views: 571

Answers (1)

snemarch
snemarch

Reputation: 5018

Since you need to handle multiple browsers, a proxy solution is going to be the most robust way to go about it - and if designed properly, shouldn't incur too much overhead. Packet sniffing is imho too complex.

You might be able to hack something specific togeher that supports your current versions of currently desired browsers, but do note theword "hack", and add in "maintenance nightmare" to the mix.

Also, you might want to rethink your tags - the qeustion doesn't really have much to do with .net, vc++ or vstudio - it's likely going to require the win32 api, though :)

Upvotes: 2

Related Questions