Purpose: Search provides names and information for geographical locations, it is probably the most comprehensive search available from GeoNames and has numereous possible parameter combinations. Note that this service allows some parameters to be arrays: country, featureclass and featurecode.
Usage: $result = geonames_query('search', $query, $options)
$query = array(
query,
name,
name_equals, maxrows=15, featureclass=p, startrow=0,
maxrows,
startrow,
country,
admincode1,
admincode2,
admincode3,
featureclass,
featurecode,
lang,
style)
- country is allowed to be an array of strings
- featurecode is allowed to be an array of strings
- featureclass is allowed to be an array of strings
- just one of the bold parameters is required
$result->results = array(name, lat, lng, geonameid, countrycode, countryname, fcl, fcode, distance, fcodename, fclname, population, elevation, alternatenames, admincode1, admincode2, adminname1, adminname2, timezone, dstoffset, gmtoffset) -- FULL style