...

View Full Version : Quick Request.ServerVariables question



newbiefied
07-10-2002, 02:39 PM
Hi All,

(like the new forums btw!)

Just a quick question..

Is there a way using ASP (i'll use JS if needs be) to find out the following from the user visiting my page!

-/Script type/Javascript Version (must be easy but cant find anywhere)

- Country visiting from (or at least keyboard type used)

- Domains visiting my site

- Keywords used from search engines to find my site and what the search engine was

- Visitor frequency (ie when was the last time they visited



----- the above will probably be several different questions..
but just seeing if i can get answers to most of them or whatever!

whammy
07-10-2002, 07:05 PM
For visitor frequency, you could set a cookie and check that, and write the results to a database or something -

For the last page accessed (which would give you the domain accessing your site), you can use:

Request.ServerVariables("HTTP_REFERER")

I believe it would be impossible to find out anything regarding the keyword search on search engines (unless it happens to be in the URL you get from HTTP_REFERER)...

Don't know any way offhand to get the client's javascript version (with ASP that is, you can get it with javascript and send it to ASP though, using a hidden frame or refreshing perhaps), but you can get the browser type with:

Request.ServerVariables("HTTP_USER_AGENT")

Hope this helps!

BrainJar
07-14-2002, 08:56 PM
Some search engines add query string data to their links so you can determine the keywords used from that referring URL. For example, Google uses something like:

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=keyword1+keyword2

A lot of log analyzers (WebTrends, LiveStats, etc.) use that info. You just have to know the format each search engine uses.

Request.ServerVariables("REMOTE_ADDR") will give you the IP address of the user, or at least the IP address of his or her ISP. Those are assigned by Internet Registries so you can look them up to determine who owns them and what country they are based in. http://www.arin.net is a good place to start. Again, some web log analyzers can look those up automatically.

The browser user agent string typically includes the browser's language. Problem is, every browser uses a different format so it's hard to parse programatically.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum