Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2002
    Location
    Midlands, UK
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Quick Request.ServerVariables question

    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!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    185
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •