Showing results for 
Search instead for 
Did you mean: 

Script to capture browser's information


Script to capture browser's information

Has anyone got a script to capture browser's information.
I'm after IP, email address, referring page etc. I know I can get some of this as standard using IIS, but if you use ISA server, you only pick up the IP address of your server (and I knew what that was before I started!).

Community Veteran
Posts: 6,111
Thanks: 1
Registered: 05-04-2007

Script to capture browser's information

I don't know of any scripts, but I presume you know that PlusNet Web Stats will give you all this? Smiley


Script to capture browser's information

Thanks, yes I did.
Unfortunately this isn't a hosted site.

Script to capture browser's information

there are more than likely plenty of scripts around which will do something like this (check PHP/CGI script archives). As for recording their email address they would have to give it to you in a form first, I don't think scripts can access this. Of course with plusnet visitors you could do a lookup of the IP and get the account name so an email to postmaster@<account> would do the trick.

Script to capture browser's information

Unfurtunatly, most of what you ask is not possible.

Lets look at each bit seperatly.

E-mail address.

As noted, unless the user gives this ifnormation to you volunteraly, you are out of luck.

The internet was designed around this, so that companies can't breech your privacy, by obtaining your valid and real address, unless you give it to them.

most mass mails come from one company selling your address to another, in a pyramid sale fashion.

As for the postmaster@<username> approach, there are major limits to this too.

Each ISP is different, and you may not be able to obtain the details needed to form an address from the info provided. Aditionaly, see the IP section below.


This is the simplest, and can be done easily. For ASP, see the many script on, this is where I got my info on this from.

However, some browsers block this information, and may be blank or even gibberish.

IP address.

As you noted, your ISA server is blocking this information.

There are two ways around this.

1: It may be possible for javascript to obtain this (don't know how true).
However, it may be the internal IP of a network, which is usless.

2: The ISA server can be configured to forward a connection, rather than proxy it.
This way, the full and true details can be obtained by your web-server.

Script to capture browser's information

I believe netscape's implementation of javascript can detect the IP address (although it will be the internal IP if it exists, as you pointed out). IE can't.
PHP can easily display the IP but will still only display the IP as the server sees it so if traffic is routed through a proxy it'll display the proxy's IP not the users.

Script to capture browser's information

I have your IP logged.

Look below.

Only joking

Script to capture browser's information

yeah i detailed how your sig works before Wink
$_SERVER['REMOTE_ADDR'] returns the IP for example and other superglobals return client string etc.
Community Veteran
Posts: 5,878
Registered: 04-04-2007

Script to capture browser's information

Surely you could use some form of webstats software to obtain some information?
If you are running apache then the raw log files will give you some data and you can use webalyzer to present this.

If you are using IIS it probably won't tell you what broswer someone is using because Microsoft will just assume everyone uses IE. :p


Script to capture browser's information

Keyfocus Webserver can also be configured to store logs of the browser.
And according to my webstats 99% of visitors use IE6 (or Opera identified as IE Roll eyes )