Guys is there a way on page load grab a city name from URL and then some how return the country it belongs to?
Lets say here is my URL: site.com/sevilla_r
How can I return EspaƱa on page load and show it in the page content?
P.S
If it's a country then do nothing!
You can use Google geocade API
This will return Country name, postal code, lat lng etc
--EDIT--
This is how i implemented it
$url = 'https://maps.googleapis.com/maps/api/geocode/json?address=shimla&key=';
$json = file_get_contents($url);
print_r($json);