I am using a script that displays links to offers based on the users zip code. Previously I was asking users to submit their zip code and then I was passing it to the script that displays the links on the next page.
I’d like to bypass the zip submit page and just detect their zip code and pass it to the script.
I’ve checked Maxmind and i don’t think it can pull zip code correctly. I tried it from different IPs and Nevada shows up fine but California doesn’t show at all.
Does anyone have a script or other method to detect the zip code and pass it to a script on the page?
not sure why it doesn’t work for you but this works perfect for me.. here’s the demo to check: https://www.maxmind.com/app/mylocation
I think you will need to rely on Maxmind or on other providers like that , but for zip codes it will be always off.
No real way to track it accurately.
i had this saved in my computer, but never test it – https://flintston.es/nerd-stuff/dirty…maxmind-geoip/
another one: https://www.geoplugin.com/quickstart
maxmind and ip2location have paid versions too, for sure are more accurate than the free ones
also, the following code is for for finding country codes, maybe can be used for zip codes too, search on google for more info