Simple yet powerful tool to allow access from your country only 1.1

now you can restrict acceessto your webidsite except only your country

  1. just avoid extra lookup to save recource

    geoPlugin free tool is limited to 120 lookups per minute.
    To avoid extra lookups just added few lines
    just replace
    if (!isset($_SESSION['countrycode']) || empty($_SESSION['countrycode'])) {

    $_SESSION['countrycode'] = (string)getUserCountry();
    if (
    $_SESSION['countrycode'] != "IN") { // just change your country code like US, UK, NZ, IN for complete list visit

    echo "<p>only visitors from my country can access this website</P><p> for more...