Monday, 15 February 2016

how to ip track location country

$key='4aa3d8dd845debd79b15b3d55449dbeddbf00645e0acdd2b943a99f298b9c089';
    $ip=$_SERVER['REMOTE_ADDR'];
$url='http://api.ipinfodb.com/v3/ip-country/?key='.$key.'&ip='.$ip;
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $data = curl_exec($ch);
    curl_close($ch);
    $dataArr=explode(";",$data);
    if($dataArr[3]=="IN"){
        //echo "<pre>"; print_r($dataArr); echo "</pre>"; exit;
        header("Location: ./india");
        exit;
    }

No comments:

Post a Comment