Moderators: nickj, Lady of Mystery, Mandrake, bananafish, support
seige wrote:Hi guys
Sorry to burden anyone with this, but if you'd be so kind, could you visit this link... it's a mate of mine who sells oak doors and oak floors etc, and we're trying to make a 'clever' page content mask for non UK visitors.
Oak doors, from Sabrina
I've been testing a script which hides and shows certain content based on your browser config.
The more savvy amongst you will take a look at the source code and see where I'm going wrong... basically, anyone who's entering the site outside the UK needs to see the Google ads, and within the UK shouldn't.
This may not make much sense, but the site is designed to be UK only, and we're getting insane traffic from the states looking for oak doors. I designed the site for a friend, and we recon that hopefully we could make a few quid AND give the US visitors 'what they're looking for' via Google relevant ads.
Especially interesting would be feedback from US visitors...
Not compulsory, and not magic, but would help me out, cos it's driving me mad!
Also, insight from any programmers savvy with Java would help!
There's a freebie in it...
If anyone can help, I'll bung them a prezzie from NUMS. Yes, I'm that desparate. We need to reduce traffic to this site. It's ranked No. 1 in Google for the search 'oak doors', and the bandwidth usage for non-UK viewers is almost 2Gb per-month, and it's getting out of hand!
seige wrote:Hmmmm
Could you confirm what browser you are using, and who your ISP is?
Cheeeers!
(The reason being, I am trying to use a browser detection and ISP detection, to determine the 'language' of the user.)
HELLLPPP!!!
seige wrote:Well, I *think* it's the script which may be causing the content filters to die.
The main problems I'm having so far, and the possible cause:
1. Firefox users: can't seem to see anything. The site dies at the homepage.
Cause: Possibly I'm using a dodgy Javascript command somewhere.
2. The 'US' content is showing to everyone, except me on my Mac.
Cause: No idea!
3. IF it's possible to write a little php script which can check browser language/locale, and then use either variables or includes to change the content, that would work a treat.
So far, the only foolproof way I can see of making the content browser lanuage depended is Javascript.
Users browsing this forum: No registered users and 10 guests