473,379 Members | 1,253 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,379 software developers and data experts.

tracking visitors using asp question

I have set up a very simple site tracker.

Each page runs the following code, to insert basic details into a MySQL
database.

ref = request.servervariables("HTTP_REFERER")
str = request.servervariables("SCRIPT_NAME") & "?" &
request.servervariables("QUERY_STRING")
ip = request.servervariables("REMOTE_ADDR")
agt = request.servervariables("HTTP_USER_AGENT")
sql = "INSERT INTO _tracker (fldurl, fldref, fldip, fldagent, flddate)
VALUES ('"&str&"','"&ref&"','"&ip&"','"&agt&"',now())"
set iRS = oConn.Execute(sql)
set iRS = nothing

I was using the IP address as the unique field here, so that I could run off
a list of pages each person visits.

However the problem is that I can look at any number of IP addresses and see
that they visited the site at say, 11am, 3pm and 7pm.

It could be the case that the same person is coming back 3 times, but also
it is likely that with ISPs having a pool of IP addresses, that the IP
address I am looking at has been used by 3 people.

Do people know if there is another piece of info I could use to separate out
the 3 IP addresses, in order to differentiate them? I'm also adding in to
the databse the HTTP_USER_AGENT but this won't be foolproof as a way to
split the same IP address up into possibly 3 different users as a lot of
people have the same browsers / OS.

Some site trackers are able to list the domain a person is visiting from -
am I able to get this information using ASP?

I have had a good trawl through the standard server variables list - where
you loop through to see all the variables using 'for each sv in
request.servervariables' but have not found anything of much use other than
those I listed above.

Thanks

Jim
============
www.jimpix.co.uk
Jul 19 '05 #1
2 2168

"Burton Figg" <so*****@somewhere.com> wrote in message
news:bn**********@titan.btinternet.com...
However the problem is that I can look at any number of IP addresses and see that they visited the site at say, 11am, 3pm and 7pm.

It could be the case that the same person is coming back 3 times,
Yes.
but also it is likely that with ISPs having a pool of IP addresses, that the IP address I am looking at has been used by 3 people.


Also, Yes. By using DHCP that same address could circulate through
any one of the ISP's customer each time disconnects from the internet
and another connects. Also many "home user" DSL systems use DHCP
(with PPPoE) and create the same effect. Even some business DSL
connections use that.

You could also have a 1000's of user's appear under the same IP
address if they are behind a proxy server of a NAT based firewall.

There is no dependable way to do what you wish. HTTP is "stateless",
there is no constant connection maintained between the user and the
server, therefore there is nothing to monitor. Even sites that seem
"stateful" really aren't. Using Cookies, Session Variables, Databases,
etc., are ways to "emulate" a statefull connection by re-identifing a
user the next time they grap a new page, but they all have weaknesses
and they only create the "illusion" of being statefull, when in fact a
statefull connection still does not and has never existed.

--

Phillip Windell [CCNA, MVP, MCP]
pw******@wandtv.com
WAND-TV (ABC Affiliate)
www.wandtv.com
Jul 19 '05 #2

"Phillip Windell" <pwindell{at}wandtv*d0t*com> wrote in message
news:ei**************@tk2msftngp13.phx.gbl...
.....proxy server of a NAT based firewall.


I meant OR not OF.
Jul 19 '05 #3

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

Similar topics

11
by: hawkon | last post by:
Hi all, I have an important question to ask about how to trap events when the user close the browser window. I'm a ASP programmer and I have s MSSQL database with a user table where I'm able to...
1
by: Robert Oschler | last post by:
This is my current strategy for tracking hyperlink clicking by a site visitor (Internet Explorer example): Using Javascript I: Attach an event to the document "onclick" handler. When a click...
4
by: Paul Lee | last post by:
Hi, I posted a question to this forum a few days ago and got a veyr good response - unfortunately I asked the wrong question (I asked about referring domains, not IPs of visitors). I've got a...
5
by: Peter Jenkins | last post by:
The client for which I do this site www.safenz.org.nz wants stats tracking/a visitor counter, like the one that is there at the moment (at the bottom of the home page). However I would like one...
8
by: gil | last post by:
I'm trying to track how many users are visiting a site and how may are logged in, using application sessions like so: Sub Session_OnStart Session.Timeout = 20 Session("Start") = Now...
6
by: A.M-SG | last post by:
Hi, We are developing a SmartClient application and we are planning to expose business objects layer to SmartClient application by using ASP.NET SOAP web services.
2
by: Nel | last post by:
I have a web site that seems to be getting hammered by lots of bots. Some genuine, some questionable. Some just users that seem to be downloading the site en-masse. I have started using php &...
3
by: Jeff | last post by:
Hey asp.net 2.0 I'm using Request.UserHostAddress and Request.UserHostName to get info about the site visitors. But the only info I get is IP addresses. Isn't there a way I can get more info...
1
by: drexcol | last post by:
I am a php newbie and am trying to write a script that will direct visitors to specific pages on my website based on which of several url’s they have entered (all are aliases of the main website)....
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.