jalle19/geoipcountryprovider
Composer 安装命令:
composer require jalle19/geoipcountryprovider
包简介
Geocoder GeoIP provider that works with the default GeoIP database
关键字:
README 文档
README
Geocoder GeoIP provider that works with the default GeoIP database. This means that you can use this provider to determine the country of a visitor simply by installing php5-geoip (or equivalent package).
Usage
$geocoder = new \Geocoder\Geocoder(); $geocoder->registerProvider(new \GeoipCountryProvider\GeoipCountryProvider()); var_dump($geocoder->geocode('8.8.8.8')); // Output: // // object(Geocoder\Result\Geocoded)[55] // protected 'latitude' => int 0 // protected 'longitude' => int 0 // protected 'bounds' => null // protected 'streetNumber' => null // protected 'streetName' => null // protected 'cityDistrict' => null // protected 'city' => null // protected 'zipcode' => null // protected 'county' => null // protected 'countyCode' => null // protected 'region' => null // protected 'regionCode' => null // protected 'country' => string 'United States' (length=13) // protected 'countryCode' => string 'US' (length=2) // protected 'timezone' => null
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-07-23