Forum » » Questions » » [Résolu] - N'autoriser que certains pays
Posté : 02-01-2015 22:46 
// BanIp avec le service&nb sp;geoplugin.net
$geoPlugin_array = unserialize(file_get_contents("http://www.geoplu gin.net/php.gp?ip=".$_SERVER['REMOTE_ADDR']));
$pays_autorise = array ("fr","FR","BE","CH");
if (in_array($geoPlugin_array['geoplugin_countryCode'],$pays_autorise))& nbsp;{
}
else { header('Location:http://google.com/'); exit(); } span>
Cet article provient de NPDS REvolution 16
https://lab.grottes-et-karsts-de-chine.org/viewtopic.php?topic=26215&forum=9