[ale] Can I identify the country of origin?
Jim
jcphil at mindspring.com
Wed Sep 25 11:29:17 EDT 2002
On Wednesday 25 September 2002 11:05 am, Matt Smith wrote:
> If I'm not mistaken, Apache already has this functionality. It's not based
> on the IP's country of origin, but the language settings of the browser
> which are sent with the request.
>
> If you've ever noticed the default homepage(s) that come with Apache,
> there's one for basically many languages, and apache will auto-select the
> page and display it automatically. I'd provide a good link, but I can't
> get to apache.org right now for some reason. :/
>
> I would go down that path before trying to roll your own. (Assuming you're
> using Apache, of course)
>
> If you're not using apache, you can analyze your server logs using
> webalizer and it does a rough estimation of country of origin - it even
> generates a pretty pie chart. :)
>
>
> --Matt
I am looking at my documentation for Apache now. There are three fields in the
header being sent by the browser that relate to locale:
Accept-Language
Accept-Encoding
Accept-Charset
This can get complicated fast, due to the messy way we use ASCII to render
non-Roman characters. For Russian--which I use often--Apache uses no less
than seven different encodings. Some of these may also render Ukrainian and
Byelorussian. But if you peg everything on,say, the Accept-Language header,
that only tells you the user's preference, not the country
he lives in.
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list