The language information which is sent by the browser is with server reserved variables. Well, this solution is not based on the location of the visitor but the language setting of the browser which seems better. If doesn't matter if the visitor is from Columbia or France if he is using English as a language its better to show him the English version of the website.
You can use $_SERVER['HTTP_ACCEPT_LANGUAGE']
like this:-
<?php
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
switch ($lang){
case "fr":
include("index_fr.php");
break;
case "it":
include("index_it.php");
break;
case "en":
include("index_en.php");
break;
default:
include("index_en.php");
break;
}
?>