monitoring IP's of visitors to website

N

nmdc69

Hi folks, Is there a simple way to log IP's without CGI?
I need to log the IP's of the visitors to a website I run.
I used to have a CGI script but there's no CGI on the server I'm using
now.
Thanks.
 
R

Randy Webb

(e-mail address removed) said the following on 7/28/2006 2:13 PM:
Hi folks, Is there a simple way to log IP's without CGI?

No, and you can't even do it reliably with a CGI script.
I need to log the IP's of the visitors to a website I run.

You are out of luck.
I used to have a CGI script but there's no CGI on the server I'm using
now.

It's all the same as the CGI script wasn't reliable anyway.
 
D

David Dorward

Hi folks, Is there a simple way to log IP's without CGI?

Most webservers have built in logging facilities. The ip address the request
came from is normally part of the log entry.
I need to log the IP's of the visitors to a website I run.

The IP address the request came from might not be "the visitor's" since
proxy servers get in the way (I gather that AOL, for instance, runs all
their customers through a series of rotating transparent proxies).

Client side JavaScript has no direct access to the IP addresses (yes,
plural, my laptop often has three, this machine has two, once I regularly
used a machine with seven ip addresses) of the client.
 
R

Randy Webb

David Dorward said the following on 7/28/2006 4:17 PM:
(I gather that AOL, for instance, runs all
their customers through a series of rotating transparent proxies).

Yes, that is how AOL assigns proxies. Even if you have a broadband
connection and connect via the web, it still assigns a dynamic IP
Address to you as an AOL user. You still have your broadband IP but you
gain an AOL IP as well.
 
P

Paul

Hi folks, Is there a simple way to log IP's without CGI?
I need to log the IP's of the visitors to a website I run.
I used to have a CGI script but there's no CGI on the server I'm using
now.
Thanks.
On most Mozilla based browsers with Java installed you can use:
var host = java.net.InetAddress.getLocalHost();
var ip = host.getHostAddress();
However, the result probably won't be useful (mine returns the
localhost ip 127.0.0.1). Even if it was useful, where would you log it
(using javascript)? To another server?
Most webservers log user IP addresses by default, if not they can be
configured to. It will be the IP of either the client or the closest
proxy/gateway to your server.
For example, the Apache web server on *nix defaults logs to
/var/log/http/access Tomcat defaults to the log directory under the
TOMCAT_HOME directory.
 
A

Aaron Gray

Another solution that maybe applicable is to use Google Analytics. It does
not give IP addresses but does give a world map with cities with hits on.

Its pritty cool, you need a Google mail account, sign up for Anaytics and
you get an account in a few days.

Aaron
 
R

Randy Webb

Aaron Gray said the following on 7/28/2006 8:37 PM:
Another solution that maybe applicable is to use Google Analytics. It does
not give IP addresses but does give a world map with cities with hits on.

Then how do you propose that as "Another solution" when it clearly fails
to do anything remotely close to what the OP asked for?
Its pritty cool, you need a Google mail account, sign up for Anaytics and
you get an account in a few days.

And then you can do Analytics but it will still be worthless for IP
addresses.
 
N

nmdc69

Paul said:
On most Mozilla based browsers with Java installed you can use:
var host = java.net.InetAddress.getLocalHost();
var ip = host.getHostAddress();
However, the result probably won't be useful (mine returns the
localhost ip 127.0.0.1). Even if it was useful, where would you log it
(using javascript)? To another server?
Most webservers log user IP addresses by default, if not they can be
configured to. It will be the IP of either the client or the closest
proxy/gateway to your server.
For example, the Apache web server on *nix defaults logs to
/var/log/http/access Tomcat defaults to the log directory under the
TOMCAT_HOME directory.


Thanks. I'm not sure I understand your Java suggestion, is this a piece
of code I should put in my html?

Regarding the second suggestion, I'm not the administrator of the
webserver, I'm just managing a couple of web pages hosted on the
server. It is *nix, but I'm not sure if it's Apache, Tomcat, or
something else. There's no /var/log/http directory or $TOMCAT_HOME,
but I did find a few apache directories so I guess it's Apache. The
admin guy is on vacation...
 
N

nmdc69

David said:
Most webservers have built in logging facilities. The ip address the request
came from is normally part of the log entry.


The IP address the request came from might not be "the visitor's" since
proxy servers get in the way (I gather that AOL, for instance, runs all
their customers through a series of rotating transparent proxies).

Client side JavaScript has no direct access to the IP addresses (yes,
plural, my laptop often has three, this machine has two, once I regularly
used a machine with seven ip addresses) of the client.

Thanks. Any logging would be good, even if not very accurate, I want
to have a general idea of the domain where visitors come from. see also
my reply to Paul.
 
N

nmdc69

Randy said:
Aaron Gray said the following on 7/28/2006 8:37 PM:

Then how do you propose that as "Another solution" when it clearly fails
to do anything remotely close to what the OP asked for?


And then you can do Analytics but it will still be worthless for IP
addresses.


Thanks guys. In fact I was already using Google Analytics. It's cool
but, as Randy says, doesn't give individual IP's.
 
R

Randy Webb

(e-mail address removed) said the following on 7/29/2006 2:01 PM:
Thanks. Any logging would be good, even if not very accurate, I want
to have a general idea of the domain where visitors come from.

And you think that "not very accurate" data will give you that general
idea without that general idea being "not very accurate"? You would be
just as "accurate" to guess where I am as you would be trying to guess
where I am based on IP address.

When I am on my laptop it uses a wireless satellite connection and I get
the same static IP address whether I am in Bangladesh, New York City, or
Cape Town South Africa so knowing my IP address won't tell you where I am.
 
N

nmdc69

Randy said:
(e-mail address removed) said the following on 7/29/2006 2:01 PM:

And you think that "not very accurate" data will give you that general
idea without that general idea being "not very accurate"? You would be
just as "accurate" to guess where I am as you would be trying to guess
where I am based on IP address.

When I am on my laptop it uses a wireless satellite connection and I get
the same static IP address whether I am in Bangladesh, New York City, or
Cape Town South Africa so knowing my IP address won't tell you where I am.

well, the people accessing my websites are likely to be at some
University with a fixed IP.
Too bad if I'lI miss some accesses, if I get a % of the IP's it'll be
better than nothing.
 
D

David Dorward

Thanks. I'm not sure I understand your Java suggestion, is this a piece
of code I should put in my html?

The short version:

* It won't work for most people
* It won't give you a helpful result for most other people
* You probably won't have any way of getting the data from the visitor's
browser to your server
Regarding the second suggestion, I'm not the administrator of the
webserver, I'm just managing a couple of web pages hosted on the
server. It is *nix, but I'm not sure if it's Apache, Tomcat, or
something else. There's no /var/log/http directory or $TOMCAT_HOME,
but I did find a few apache directories so I guess it's Apache. The
admin guy is on vacation...

Wait until he gets back. The ip addresses are almost certainly being logged
already, just ask for access to the logs.
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated
Sat, 29 Jul 2006 15:49:52 remote, seen in
Randy Webb said:
(e-mail address removed) said the following on 7/29/2006 2:01 PM:

And you think that "not very accurate" data will give you that general
idea without that general idea being "not very accurate"? You would be
just as "accurate" to guess where I am as you would be trying to guess
where I am based on IP address.

When I am on my laptop it uses a wireless satellite connection and I get
the same static IP address whether I am in Bangladesh, New York City, or
Cape Town South Africa so knowing my IP address won't tell you where I am.

But he's not asking where you are; he's asking where you come from.

Wherever you happen to be, you actually are, AIUI, an EST/EDT American,
and should (according to the OP's words) be treated as such, and not as
an adventitious Bangladeshi, etc.?



I see that you have
User-Agent: Thunderbird 1.5.0.4 (Windows/20060516)
IIRC, I have heard (at least months ago) that Thunderbird could use non-
FFF dates in the Attribution (I assume 20060516 is ISO date; it cannot
be BRF).
 
R

Randy Webb

Dr John Stockton said the following on 7/30/2006 10:57 AM:
JRS: In article <[email protected]>, dated
Sat, 29 Jul 2006 15:49:52 remote, seen in

But he's not asking where you are; he's asking where you come from.

It is still irrelevant as the IP address for my laptop is through
Chicago, Illinois, the IP address on my desktop at work will report as
being in New York City, New York. The IP Address I have at home will
report as being in Dallas, Texas and if I open a webpage using AOL then
the IP address will suppose to you that I am in Dulles, Virginia (all in
the USA). Yet, I am not within 500 kilometers of any of those physical
locations. So no, the IP Address won't even come close to telling you
where I am, where I came from, nor where I am going.
Wherever you happen to be, you actually are, AIUI, an EST/EDT American,
and should (according to the OP's words) be treated as such, and not as
an adventitious Bangladeshi, etc.?

Perhaps, unless I am in Paris and want to read French.
I see that you have
User-Agent: Thunderbird 1.5.0.4 (Windows/20060516)

Yes, that is what I have.
IIRC, I have heard (at least months ago) that Thunderbird could use non-
FFF dates in the Attribution (I assume 20060516 is ISO date; it cannot
be BRF).

It probably can, if I were so inclined to look it up and cared what
format it puts the Date in.
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated
Sun, 30 Jul 2006 16:18:29 remote, seen in
Randy Webb said:
Dr John Stockton said the following on 7/30/2006 10:57 AM:

It is still irrelevant as the IP address for my laptop is through
Chicago, Illinois, the IP address on my desktop at work will report as
being in New York City, New York. The IP Address I have at home will
report as being in Dallas, Texas and if I open a webpage using AOL then
the IP address will suppose to you that I am in Dulles, Virginia (all in
the USA). Yet, I am not within 500 kilometers of any of those physical
locations. So no, the IP Address won't even come close to telling you
where I am, where I came from, nor where I am going.

Those addresses are all, as you admit, for the USA. For any server not
providing merely local services within part of the USA, they're all
substantially equivalent.

Perhaps, unless I am in Paris and want to read French.

Why should you want to read French only if you are in a francophone
location? If you are in France, PQ, &c., you may want to read local
material; but you will want to read it in whichever language is most
comprehensible, independently of your actual location (unless you're a
Secret Agent pretending to be a Local Person). And you might wish to
read French before you go there, to refresh your putative capability
before you leave the USA. FYI, the book I most recently read was in
French, and dealt with an early trip to America (and back via
Scandinavia).

If more than one language is available for the desired material, the
client should be allowed to choose personally.

It probably can, if I were so inclined to look it up and cared what
format it puts the Date in.

It's a matter of whether you wish to appear to care for your readers,
most of whom find FFF dates uncongenial and in an appreciable fraction
of cases misleading. Though your use of the 12-hour clock does suggest
fairly strongly that the date may also be weird.
 
R

Randy Webb

Dr John Stockton said the following on 7/31/2006 7:41 AM:
JRS: In article <[email protected]>, dated
Sun, 30 Jul 2006 16:18:29 remote, seen in

Those addresses are all, as you admit, for the USA.

I did not say they were "for" the USA, only that they are "in" the USA.
The difference is quite substantial. With a proper satellite connection
you can even use the one in Chicago while in London. So no, they are not
for the USA even though they are in the USA.
For any server not providing merely local services within part of the USA,
they're all substantially equivalent.

So you admit that knowing an IP Address, and where it originates, is
totally useless? Otherwise, they can't be "substantially equivalent".

Why should you want to read French only if you are in a francophone
location? If you are in France, PQ, &c., you may want to read local
material; but you will want to read it in whichever language is most
comprehensible, independently of your actual location (unless you're a
Secret Agent pretending to be a Local Person).

Or you are a student wanting to practice the language, or you are a
traveler wanting to practice the language, or you are a Usenet poster
giving a positive example of why the IP Address is totally useless.
And you might wish to read French before you go there, to refresh your
putative capability before you leave the USA.

Perhaps, perhaps not.
FYI, the book I most recently read was in French, and dealt with an
early trip to America (and back via Scandinavia).

I am sure that somehow that means something to you with relation to IP
Addresses but it doesn't me.
If more than one language is available for the desired material, the
client should be allowed to choose personally.

Precisely and the IP Address sure isn't a way to try to determine that
language. And that only goes to reinforce what I said to start with.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top