I would like to know a php library that would help me with the location of the user's IP access, well I found one on the internet and it worked well (did not exactly show the location) only 50 km of difference but at least know the city of access! Until here, this application uses the link to get the information, if, I load the page with the ip, it shows the data perfectly but if I put in to bring the information in the time when my Ajax is keeping those informed in the bank, it's a mistake! do not load the link to bring the ip info!
Does anyone know of any other method? library or article to help me? or better anyone know me explain why php with ajax does not load the link to the variables by?
echo "Geolocation results for {$geoplugin->ip}: <br />\n".
"City: {$geoplugin->city} <br />\n".
"Region: {$geoplugin->region} <br />\n".
"Area Code: {$geoplugin->areaCode} <br />\n".
"DMA Code: {$geoplugin->dmaCode} <br />\n".
"Country Name: {$geoplugin->countryName} <br />\n".
"Country Code: {$geoplugin->countryCode} <br />\n".
"Longitude: {$geoplugin->longitude} <br />\n".
"Latitude: {$geoplugin->latitude} <br />\n".
"Currency Code: {$geoplugin->currencyCode} <br />\n".
"Currency Symbol: {$geoplugin->currencySymbol} <br />\n".
"Exchange Rate: {$geoplugin->currencyConverter} <br />\n";
The class geoplugin already loads the ip altomaticamente so do not need to create variable for this, just ask the infomraçoes