|
|
 |
Re: FN-FORUM: Country detection
date posted 23rd January 2005 19:25
In PHP you can use $_SERVER['HTTP_ACCEPT_LANGUAGE'] variable which
gives you the browser language. You could only show the ad to people
with en-gb as their browser language. I used it on something recently
to determine location and it worked reasonably well for the 15-20
countries it was set up to work with, it does of course assume that
the user actually has the browser set to the correct language (firefox
defaults to en-us on install for example).
On 23 Jan 2005 17:52:16 -0000, Jonathan Chong [EMAIL REMOVED] wrote:
>
> Hi everyone
>
> An advertiser has contacted me about advertising on one of my sites. He
> wants the ads to only target audiences from the UK.
>
> I've done some testing and searching, and the solution I came up with
> was to store a range of IP addresses in a table and check that against
> the user's IP.
>
> The problem is, it doesn't always work - I'm on BT and my IP address
> doesn't come up in the IP addresses table.
>
> If anyone has an idea on how I could better achieve "country detection",
> I'd be much obliged!
>
> --
> Jonathan Chong
|
 |
|