PHP code example of jenzri-nizar / zf3-geolocation
1. Go to this page and download the library: Download jenzri-nizar/zf3-geolocation library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jenzri-nizar / zf3-geolocation example snippets
composer
composer update
'modules' => array(
'...',
'Zf3\Geolocation'
),
provider - Le nom du plug-in à utiliser (voir exemples @vendor/jenzri-nizar/zf3-geolocation/src/Service/plugins/);
return_formats - Les formats de retour pris en charge par le plugin
api_key - Si nécessaire, vous pouvez passer votre clé api.
public function geopipAction(){
$GeoIp=$this->GeoIp()->getInfo("87.98.187.238");
$Weather=$this->GeoIp()->GetWeather($GeoIp->geoplugin_latitude,$GeoIp->geoplugin_longitude,$GeoIp->geoplugin_currencyCode);
return new ViewModel(array("Weather"=>$Weather,"GeoIp"=>$GeoIp));
}