|
 |
asp_web_howto thread: Getting Country info from http_header
Message #1 by "Rob" <rob@m...> on Wed, 6 Dec 2000 18:48:01 -0700
|
|
how would I determine what country the originating referrer came from?
I seem to remember being able to find where the server was located through
it's local id, but can't remember the specifics or how to search for the
specifics I need.
Rob
Developer, Web Administrator
SQL Administrator
(xxx) xxx-xxxx
www.MarketWebSolutions.com
Message #2 by Scott Watermasysk <swatermasysk@C...> on Thu, 7 Dec 2000 07:48:52 -0500
|
|
You could use the ClientCertificate. I am not sure you can get this for
everyone, but it is available.
Select Case Request.ClientCertificate("SubjectC")
Case "UK"
Case "DE"
Case "US"
Case Else
End Select
I found this in the Wrox Proffesional ASP 3.0 book.
Scott M. Watermasysk
Manager,
New Product Development
CONSUMER
HEALTH
SCIENCES
swatermasysk@c...
-----Original Message-----
From: Rob [mailto:rob@m...]
Sent: Wednesday, December 06, 2000 8:48 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Getting Country info from http_header
how would I determine what country the originating referrer came from?
I seem to remember being able to find where the server was located through
it's local id, but can't remember the specifics or how to search for the
specifics I need.
Rob
Developer, Web Administrator
SQL Administrator
(xxx) xxx-xxxx
www.MarketWebSolutions.com
Message #3 by Vince Kavanagh <vince@6...> on Thu, 07 Dec 2000 15:07:31 +0000
|
|
Using information found at asptoday and others, I wrote a simple script that redirected the user based
on the browser setting, I thought the browser setting would be more accurate than the the server locale due to remote hosting.
In the global.asa I wrote;
Sub Session_OnStart()
Dim strLanguage, strPos
strLanguage = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
strPos = InStr(strLanguage, ",")
If strPos > 0 Then
strLanguage = Left(strLanguage, strPos - 1)
End If
Session("Language") = strLanguage
Select Case Session("Language")
Case "it"
Session("LCID") = 1040
Case "es"
Session("LCID") = 1034
Case "fr"
Session("LCID") = 1036
Case "de"
Session("LCID") = 1031
Case Else
Session("LCID") = 1033
End Select
End Sub
Sub Session_OnEnd
and in the index page I put;
<%
Select Case Session("Language")
Case "it"
Response.Redirect "welcome_it.asp"
Case "es"
Response.Redirect "welcome_es.asp"
Case "fr"
Response.Redirect "welcome_fr.asp"
Case "de"
Response.Redirect "welcome_de.asp"
Case Else
Response.Redirect "welcome_en.asp"
End Select
%>
Best Regards,
Vince.
Rob wrote:
> how would I determine what country the originating referrer came from?
>
> I seem to remember being able to find where the server was located through
> it's local id, but can't remember the specifics or how to search for the
> specifics I need.
>
> Rob
> Developer, Web Administrator
> SQL Administrator
>
> (xxx) xxx-xxxx
>
> www.MarketWebSolutions.com
>
|
|
 |