Php ile Ülke Engelleme?
2
●474
- 12-04-2018, 18:11:51//Get user IP address $ip=$_SERVER['REMOTE_ADDR']; //Using the API to get information about this IP $details = json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=$ip")); //Using the geoplugin to get the continent for this IP $continent=$details->geoplugin_continentCode; //And for the country $country=$details->geoplugin_countryCode; //If continent is Europe if($continent==="EU" && $country==="UK" || $continent!="EU"){ //Do action if country is UK or not from Europe}else{ //Do action if country is in Europe , but its not UK }Flexible adlı üyeden alıntı: mesajı görüntüle