• 0

VB.NET code that will count the time you've been online at a particular website


Question

VB.NET code that will count the time you've been online at a particular website
Is it possible?  :s
 
I don't know where to start..
HELP PLEASE  :blush:
 
i was inspired by the android App - Checky that counts how many times you look at your phone.
And now I want to make a version which can be use in a PC.
Basically, my plan is that I want to record how long a user consumes his/her time on a website like Facebook in a day,
then it will notify/alert the user when it exceeds the given time (set by the user) where he/she can only visit the website..
 

sorry for poor explanation ...
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Sure.

 

 

Personally I'd first set a cookie with the time when they first visit and then in set intervals compare it with the current time.

 

Then display it with your preferred method.

 

If you want more than a session total, you will need to note the date too.

 

I think JavaScript would be more suitable for this, than VB.NET.

Link to comment
Share on other sites

  • 0

How would you know that the user is actually looking at the page and not merely having it open in some tab, perhaps even having the window minimized? Sounds like something you'd do as a browser extension rather than a standalone application because you'd need to query some browser-specific APIs (if they exist). 

Link to comment
Share on other sites

  • 0

At a guess, proxification of traffic to said website. There are a few ways to do that, some more complicated than others. Here's one way that may work:

A) Write a program that listens on port 80. This may conflict with other software such as Apache etc.

B) Append entry to hosts file to redirect requests from a website's primary DNS to the local loopback device: 127.0.0.1 Specificwebsite.com

C) Establish connection to real server on port 80 and forward requests to it, all the while recording activity, and potentially denying further requests if a specific condition is met (such as a time quota).

Link to comment
Share on other sites

This topic is now closed to further replies.