473,394 Members | 1,800 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Country of origin

Hi

I am trying to set page content to reflect where the user may come from.

Is there a fairly simple way to tell where web page requests are coming
from? (Site is on a Win2003 server)

i.e. something like (I know it not real)
<%If Request.ServerVariable(".HTTP_USER_ COUNTRY")="UK" Then %> ...

Thanks
M

--

http://www.MettaWeb.com

Jul 22 '05 #1
8 2617
On Sat, 29 Jan 2005 11:58:45 -0000, "Mettá"
<me**********@this-metta.org.uk> wrote:
I am trying to set page content to reflect where the user may come from.

Is there a fairly simple way to tell where web page requests are coming
from? (Site is on a Win2003 server)


Yep. Ask the user.

Jeff
Jul 22 '05 #2
Yes! ...and I thought another way might be to do this automatically to help
visitors rather than get them to click an icon or whatever!

Any helpful suggestions appreciated.

M

--

http://www.MettaWeb.com
"Jeff Cochran" <je*********@zina.com> wrote in message
news:41*****************@msnews.microsoft.com...
On Sat, 29 Jan 2005 11:58:45 -0000, "Mettá"
<me**********@this-metta.org.uk> wrote:
I am trying to set page content to reflect where the user may come from.

Is there a fairly simple way to tell where web page requests are coming
from? (Site is on a Win2003 server)


Yep. Ask the user.

Jeff

Jul 22 '05 #3
On Sat, 29 Jan 2005 21:23:44 -0000, "Mettá"
<me**********@this-metta.org.uk> wrote:
Yes! ...and I thought another way might be to do this automatically to help
visitors rather than get them to click an icon or whatever!


With what are you going to identify the user's country? You might
read it from a piece of data on their system, though not from ASP.
And not if they use a laptop from Uruguay while vacationing in
Paraguay. Unless you ask, you can't find out what country the user is
in.

Jeff
Jul 22 '05 #4
Thanks for your response, however I am wondering how site stats packages
record (slightly inaccurately) visitors by country? I thought it might be
possible to use this information to set some page content with an option to
change it if the country is incorrect?

Thanks
M

--

http://www.MettaWeb.com
"Jeff Cochran" <je*********@zina.com> wrote in message
news:41*****************@msnews.microsoft.com...
On Sat, 29 Jan 2005 21:23:44 -0000, "Mettá"
<me**********@this-metta.org.uk> wrote:
Yes! ...and I thought another way might be to do this automatically to
help
visitors rather than get them to click an icon or whatever!


With what are you going to identify the user's country? You might
read it from a piece of data on their system, though not from ASP.
And not if they use a laptop from Uruguay while vacationing in
Paraguay. Unless you ask, you can't find out what country the user is
in.

Jeff

Jul 22 '05 #5
On Sun, 30 Jan 2005 09:45:34 -0000, "Mettá"
<me**********@this-metta.org.uk> wrote:
Thanks for your response, however I am wondering how site stats packages
record (slightly inaccurately) visitors by country? I thought it might be
possible to use this information to set some page content with an option to
change it if the country is incorrect?


Look at the IP address assignments for countries and use that to base
your pages on. It's not accurate, and may tick off visitors who
aren't from the country you determined they are. Domains are more
accurate, buy only if the TLD is a country domain.

Jeff
Jul 22 '05 #6
ACCEPT_LANGUAGES ?

Waht is this for. Is this to lnow where is rezlly rhe user or just to see
what is the language he prefers ?

Patrice

--

"Mettá" <me**********@this-metta.org.uk> a écrit dans le message de
news:%2****************@tk2msftngp13.phx.gbl...
Hi

I am trying to set page content to reflect where the user may come from.

Is there a fairly simple way to tell where web page requests are coming
from? (Site is on a Win2003 server)

i.e. something like (I know it not real)
<%If Request.ServerVariable(".HTTP_USER_ COUNTRY")="UK" Then %> ...

Thanks
M

--

http://www.MettaWeb.com

Jul 22 '05 #7
On Sat, 29 Jan 2005 11:58:45 -0000, "Mettá"
<me**********@this-metta.org.uk> wrote:
Hi

I am trying to set page content to reflect where the user may come from.

Is there a fairly simple way to tell where web page requests are coming
from? (Site is on a Win2003 server)

i.e. something like (I know it not real)
<%If Request.ServerVariable(".HTTP_USER_ COUNTRY")="UK" Then %> ...

Thanks
M


You can determine country of origin by IP, but not 100% accurately.

There are free and paid for databases out there for this, the paid for
ones are more accuarate and updated more frequently.

Basically they contain IP address ranges and the country that those
ranges are assigned to and you simply do a lookup on the IP address.

At the best though they still can't promise 100% coverage.

For example big ISPs like AOL though can report all their IPs as being
USA even though it may be a UK AOL user.

I have a site that trys to do a detection to determine what currency
to display, but it also offers the user the choice to change, as it
can't be 100% correct then don't force the user to use your site in a
particular way based upon the detection.

Have a search on google for "free geographic IP csv" or some such.

--
Iain Norman | http://www.eliteforum.org
Jul 22 '05 #8
Gazing into my crystal ball I observed "Patrice" <no****@nowhere.com>
writing in news:Ok**************@TK2MSFTNGP11.phx.gbl:
ACCEPT_LANGUAGES ?

Waht is this for. Is this to lnow where is rezlly rhe user or just to
see what is the language he prefers ?

Patrice


The term is HTTP_ACCEPT_LANGUAGES. It's what the browser sends the
server. It is the user's preferred language, not where the person is.

This could be useful if you had more than one language available on a
site, for example;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%If
Instr(Request.Servervariables("HTTP_ACCEPT"),"appl ication/xhtml+xml") > 0
Then
Response.ContentType = "application/xhtml+xml; charset=iso-8859-1"
Else
Response.contentType = "text/html; charset=iso-8859-1"
End If
If Request.Servervariables("HTTP_ACCEPT_LANGUAGES") = "fr" Then %>
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
<!--#include file="frenchmenu.inc"-->
<%Else%>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<!--#include file="englishmenu.inc"-->
<%End If%>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Randy Webb | last post by:
Is the HTTPRequest Object in IE limited to the Same Origin Policy when run from a webserver? <URL: http://www.hikksworld.com/HTTPRequestIE.html /> When run in IE, throws a "Permission Denied"...
1
by: charles | last post by:
when i read the notable book of inside the c++ bject model ,i was confused by the chapter 3.3. i was confused by the statement as follow: chaper 3.3: Given the following pair of program...
6
by: Mel | last post by:
i know its not an exact science but... is there a way to guestimate the country from IP address ? thanks
0
by: ArunPrakash | last post by:
Hi All, I have a requirement where I need to find which country or region the request for my web page( aspx ) comes from. Is there any way of doing this. I think google already does this( I am...
1
by: johannblake | last post by:
I want to create a scrollable window using GDI+ where the origin is located in the bottom-left corner rather than the default top-left corner. Currently I have found several examples on how to...
7
by: Lloyd Dupont | last post by:
from the IP of the request ?
10
by: Nospam | last post by:
I have a few javascripts. I would like to show a certain script based on the country ip of the viewer, how would I achieve this? is there html I could use to run the javascript based on the...
13
by: bushi | last post by:
hi everyone! i want to get the ipaddress,and the country name of a webpage visitor,using asp.Net(C#).if anyone knows about it,plz rply me. thanx in advance.
0
by: =?Utf-8?B?TWFyaw==?= | last post by:
I'm trying to create a visual aid program to mimic a VIPP layout. In VB.NET the screen origin (0,0) is the top left hand corner of the screen. Is there a way to reset the origin to the bottom left...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.