473,383 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Get information from visitors...

Hello,

I am adding a statistics section to my administration area and I need to
get information from my web site visitors when session starts. I know
this is done in glabal.asax.

My question is: how to get information from the web site visitors?

I would like to get some information like:
1. Country;
2. Os;
3. Time so I can determine how much time does the user spend in the web
site.

Is there some code or something like this in Asp.Net?

I want to get the data myself because I want to include all this in my
administration system so livestats and other products are not what I am
looking.

Thanks,
Miguel

Nov 19 '05 #1
2 1882
you can use the request object to grab lots of information about visitors,
including browser type and useragent which will normally give enough info to
deduce OS, and of that information , see
http://msdn.microsoft.com/library/de...mberstopic.asp .

Country is a little harder. You can grab the users IP via
Request.UserHostAddress, and then do a reverse-DNS on that to work out what
RIPE block the IP is in. As RIPE block records are generally allocated to
countries this will give a 90%+ degree of accuracy. Theres a project on
codeproject that shows how to do this, or else download the dotnetnuke
portal (www.dotnetnuke.com), and take a look at the project in
controls\CountryListBox (it also ships with the necessary lookup file
GeoIP.dat in the data folder)

As for time, you could probably work it out via how long the users session
is active, but it's inaccurate, as they may have left the site before the
session times out.


"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:eh**************@TK2MSFTNGP14.phx.gbl...
Hello,

I am adding a statistics section to my administration area and I need to
get information from my web site visitors when session starts. I know
this is done in glabal.asax.

My question is: how to get information from the web site visitors?

I would like to get some information like:
1. Country;
2. Os;
3. Time so I can determine how much time does the user spend in the web
site.

Is there some code or something like this in Asp.Net?

I want to get the data myself because I want to include all this in my
administration system so livestats and other products are not what I am
looking.

Thanks,
Miguel

Nov 19 '05 #2
you can use the request object to grab lots of information about visitors,
including browser type and useragent which will normally give enough info to
deduce OS, and of that information , see
http://msdn.microsoft.com/library/de...mberstopic.asp .

Country is a little harder. You can grab the users IP via
Request.UserHostAddress, and then do a reverse-DNS on that to work out what
RIPE block the IP is in. As RIPE block records are generally allocated to
countries this will give a 90%+ degree of accuracy. Theres a project on
codeproject that shows how to do this, or else download the dotnetnuke
portal (www.dotnetnuke.com), and take a look at the project in
controls\CountryListBox (it also ships with the necessary lookup file
GeoIP.dat in the data folder)

As for time, you could probably work it out via how long the users session
is active, but it's inaccurate, as they may have left the site before the
session times out.


"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:eh**************@TK2MSFTNGP14.phx.gbl...
Hello,

I am adding a statistics section to my administration area and I need to
get information from my web site visitors when session starts. I know
this is done in glabal.asax.

My question is: how to get information from the web site visitors?

I would like to get some information like:
1. Country;
2. Os;
3. Time so I can determine how much time does the user spend in the web
site.

Is there some code or something like this in Asp.Net?

I want to get the data myself because I want to include all this in my
administration system so livestats and other products are not what I am
looking.

Thanks,
Miguel

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bosconian | last post by:
I have a client that provides a list of companies on their web site (powered by PHP/MySQL.) These companies advertise their services to visitors. The company information has been maintained...
5
by: toedipper | last post by:
Hello, I am developing a site using php and mysql and I would like to be able to let visitors know how many other visitors are currently browsing the site i.e. 'There are currently x amount of...
6
by: Simon Wigzell | last post by:
My client wants to have credit card information fields on his forms for his website visitors to be able to buy his wervices by credit card. The credit card info - Brand, number and expiry date will...
5
by: cc | last post by:
From the popular website At this link: http://www.w3schools.com/asp/asp_globalasa.asp I got this code, but it does not work on my server... I can open three IE browsers and watch the count go to...
0
by: Shapper | last post by:
Hello, I am adding a statistics section to my administration area and I need to get information from my web site visitors when session starts. I know this is done in glabal.asax. My question...
0
by: ip2location.inc | last post by:
IP2Location has announced the availability of IP2Location .NET Component, that enables application developers to geolocation the Internet visitors by IP Address from their .NET applications. ...
3
by: johnny | last post by:
hi all! I am starting to study the best way to track site visitors. Logfiles stats which come with every web hosting, have little metrics to be analyzed and also problems with cached pages which...
4
by: Chris | last post by:
Hi, i want to get the amount of visitors online. I did this in global.asax I tested it by opening several browser sessions. The amount increases, but never decreases, when i close some...
6
by: tenxian | last post by:
It is said as for code, developing a website that can stand 10,000 concurrent visitors is much different from developing a website that can stand 1,000 concurrent visitors, is it true?
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.