I was wondering if there is currently any API out there or script for location selection on sign up forms. Instead of locally storing every city state, country etc.. have a remote service or API managing it. I would even settle with a script which handles all of it. Any tips?
There aren't likely to be any new countries (or states/provinces) created anytime soon, so that'll be why there probably isn't such a service. You could even store it as a text-file, one country per line and loop through them rather than having the write the HTML or whatever out for each one.
well i just dont want to have to manage it, and im trying to do a form for a sign up. I dont want to allow people to just type in the location because people like to type in ebonics on my site. @MyVodaFone thanks for the link. Ill check it out. Looks cool supports MySQL.
Try This: IP Address Geolocation XML API http://ipinfodb.com/ip_location_api.php Or you can find IP to COUNTRY or CITY. http://www.webconfs.com/ip-to-city.php
You can't without using javascript. Try the website bellow for precise locations. http://www.geobytes.com/geodirection.htm But you have to figure out how to convert vajascript values to php.
Just use a dropdown with a list of countries. I do this all the time, and I have a PHP file I include all the time: <?php include('helpers/countries.php');?> PHP:
Cant? Well i dont have an option considering this is being done for mobile phones. Thank you for your input and advice though. I will check them out.
I am not looking for IP Geolocation recognition. I am looking for a drop down of all the countries in the world, another drop down of all the locales in that country, then another drop down for the towns/cities in that locale. I wish there was a simple API for doing this.