Log URL's visited
-
Hi, I'd like to monitor the sites a user visits, so i'd like to log all the url's visited by a particular user! Would it be possible to copy the url as soon as the user hits enter after typing in the url or am i going to have to copy the url from the browser cache or history! Can some please help me out with the source code to do this:-D, no matter what way you choose to do it! Thanx 4 the help ..!
-
Hi, I'd like to monitor the sites a user visits, so i'd like to log all the url's visited by a particular user! Would it be possible to copy the url as soon as the user hits enter after typing in the url or am i going to have to copy the url from the browser cache or history! Can some please help me out with the source code to do this:-D, no matter what way you choose to do it! Thanx 4 the help ..!
This is best done by using a Browser Helper Object (BHO). An old article on MSDN describing BHOs uses just the example you're looking for, except that instead of logging the URL it displays the content of the page when the document is done download. Read Browser Helper Objects: The Browser the Way You Want It[^]. If you need further help on this, please visit the VC++ forum here on CodeProject. You can write a BHO using C#, but you need to declare a lot of interop'd interfaces and perform a lot of marshaling. Sorry to say, based on how you phrased your question you may have more problems with this. Besides, when you're hooking a majority of the events on
DWebBrowserEvents2
, you need to be quick. Managed code can be faster than native code, but when a lot of marshaling is involved, you'll find that performance is quite a bit slower.Microsoft MVP, Visual C# My Articles