473,809 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1905
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.UserHos tAddress, 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\Countr yListBox (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.*DELETE 2SEND*com> wrote in message
news:eh******** ******@TK2MSFTN GP14.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.UserHos tAddress, 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\Countr yListBox (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.*DELETE 2SEND*com> wrote in message
news:eh******** ******@TK2MSFTN GP14.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
1828
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 exclusively by the client, but now they would like to provide a way for the companies to update their own information. Can someone suggest a reasonable secure method to allow the companies to edit their own information without a login and...
5
7104
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 visitors browsing this site' You can see this in action in the following sites but I am not sure what technology they use www.recruitni.com (about 1/3 down the page) and also www.scancom.co.uk on the left hand side.
6
3361
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 be sent to the server and stored in the database as the .asp page calls itself on Submit. How secure is this? I've never had to worry about it before but is form information encrypted before being sent to the server? Are there any legal...
5
3629
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 three. Upon closing two, each having separate sessions (and session ID's of course), the count remains at three! I'm not looking for alternative ways of doing this: I'm interested in knowing why the application variable does not get reduced...
0
249
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 is: how to get information from the web site visitors? I would like to get some information like: 1. Country;
0
1134
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. IP2Location .NET Component is fully managed code written for .NET Framework. The component enables you to discover in real-time, where your web visitors are coming from by IP address. You can then dynamically tailor the content of your site based on...
3
4419
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 are not seen. I thought to use php and cookies to track returning visitors, however I see that all pro solutions use javascript to set cookies. Now since I prefer to avoid js as much as I can cause they can be blocked by browser settings, is it...
4
2244
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 browsers. I have heard of 'session.abandon' but have no idea where to put it (not in Sub Session_End because it's not fired) I don't want to use the session.timeout.
6
1445
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
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7662
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.