Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - retrieve zipcode or location of client
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

retrieve zipcode or location of client

 Post Reply Post Reply
Author
Dan H View Drop Down
Newbie
Newbie


Joined: 17 September 2006
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan H Quote  Post ReplyReply Direct Link To This Post Topic: retrieve zipcode or location of client
    Posted: 17 September 2006 at 7:55pm
I want to display geographically relevent advertisements on my site. Is there a way to pull a zip code or something from the header?

Edited by Dan H - 17 September 2006 at 7:56pm
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2006 at 1:47am
Best you can do is a use a GEOIP data base to map IP addresses from the header. Not particularly accurate though. My IP block maps to my ISP's business office - 2500 miles away. Proxy's tend to mask IP addressess as do some firewalls and browser extensions.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
Dan H View Drop Down
Newbie
Newbie


Joined: 17 September 2006
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan H Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2006 at 2:12am
Very interesting! I'll check it out. Thanks for the quick reply.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2006 at 10:54am
I use MaxMinds GeoIP Country on this site to get the country the user is from based on their IP address.

I find it very accurate at getting the correct countries based on the users IP, I've also written a function that can workout the continent the user is from based on their country code. PM me your email address if you would like a copy of this country code to continent code function.

I use it on this site to block certain counties that are hotspots for software pirating, hacking, and fraudulent transactions.

I also use the it with the continent function I have written to display pricing in the purchasing section in a currency more relevant to the user, eg. If you are in Europe it displays in Euros by default.

You can get GeoIP from www.maxmind.com

Edited by -boRg- - 18 September 2006 at 10:55am
Back to Top
Dan H View Drop Down
Newbie
Newbie


Joined: 17 September 2006
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan H Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2006 at 5:39pm
I just got a 'test' account with GeoIP, so I can check it out- see if it does what I need. I'll let you know how it goes.
Thanks, Dan.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.