Subscribe to Subscribers
Talk to Webmaster Tony John

Online Members

baskar
More...

Forums » .NET » ASP.NET »

How to access browser's history programmatically in local machine


Posted Date: 02 Jun 2012      Posted By:: Satish Madugundu     Member Level: Silver    Member Rank: 789     Points: 3   Responses: 1



Hi
I wanted to create one windows/console application which tracks all browser's (IE, FireFox, Chrome) history and how much time site has been visited.
I want to track these two details url and time and I want to send these details to database so that admin can check all employee's browsing history.
is it possible? if so how?

Thanks in Advance
Satish Madugundu




Responses

#673626    Author: Prasad kulkarni        Member Level: Diamond      Member Rank: 8     Date: 02/Jun/2012   Rating: 2 out of 52 out of 5     Points: 4

you can get the browser history using C#, with URL history wrapper class and STATURLEnumerator. which help us to get URL history

check for following code


// List of URL objects
public List<URL> URLs
{
get; set;
}
public IEnumerable<URL> GetHistory()
{
// Initiate main object
UrlHistoryWrapperClass clsURLW = new UrlHistoryWrapperClass();

// Enumerate URLs in History
UrlHistoryWrapperClass.STATURLEnumerator enumeratorURL =clsURLW.GetEnumerator();

// Iterate through the enumeration
while (enumerator.MoveNext())
{
// Obtain URL and Title
string url = enumeratorURL.Current.URL.Replace('\'', ' ');

// In the title, eliminate single quotes to avoid confusion
string title = string.IsNullOrEmpty(enumeratorURL.Current.Title)? enumeratorURL.Current.Title.Replace('\'', ' ') : "";


// Create new entry
URL U = new URL(url, title, "Internet Explorer");

// Add entry to list
URLs.Add(U);}

// Optional
enumeratorURL.Reset();

// Clear URL History
clsURLW.ClearHistory();
return URLs;
}


hope it helps

Thanks
Koolprasd2003
[DotNetSpider MVM]



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Buttonclick firing on textchanged event
Previous : TabContainer position changes when height of tabpanel varies
Return to Discussion Forum
Post New Message
Category:

Related Messages
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.