Block Country

check Demo: Demo (khusus indonesia)

<style>
 .notif {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: yellow;
    z-index:9999;
    }

.notif-content {
    padding: 10px; 
    text-align: center;
}ul#blockedCountries {
    background: #222;
    color: #fff;
    max-height: 400px;
    width: 100%;
    list-style-type: decimal;
    line-height: 50px;
    padding: 0;
    margin: 0;
    text-align: left;
    overflow-y: auto;
    overflow-x: hidden;
}
  ul#blockedCountries li {
    margin: 0 0 0 40px;
}
  .svgbclist{fill:#e00000;width:50px;height:50px}
</style>


<script>
  /*<![CDATA[*/
function blokirNegara() {
    var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
  var listblokir = {
    'America/New_York': 'Your country is not available here.', // Amerika Serikat

    'Asia/Jakarta': 'Your country is not available here.', // Indonesia
};
     var listUlli= `<ul id="blockedCountries">
    <li>Amerika Serikat - America/New_York</li>
    <li>Indonesia - Asia/Jakarta</li></ul>`;
    if (listblokir[timeZone]) {
   var html = `<div class="notif"><div class="notif-content"> 
<svg class="svgbclist" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.775 0a1.8 1.8 0 0 0-1.273.527L.528 6.503A1.8 1.8 0 0 0 0 7.775v8.45c0 .478.19.936.528 1.274l5.974 5.974A1.8 1.8 0 0 0 7.775 24h8.45a1.8 1.8 0 0 0 1.273-.527l5.975-5.974A1.8 1.8 0 0 0 24 16.225v-8.45a1.8 1.8 0 0 0-.527-1.272L17.498.527A1.8 1.8 0 0 0 16.225 0zm4.427 3c1.02 0 .958 1.108.958 1.108v6.784s-.009.218.16.218c.188 0 .175-.226.175-.226l-.002-5.63s-.05-.986.959-.986c1.01 0 .97.983.97.983v7.621s.014.158.141.158c.127 0 .944-2.122.944-2.122s.451-1.497 2.576-1.1c.038.008-.167.688-.167.688l-2.283 6.556S15.69 20.7 11.714 20.7c-5.044 0-4.808-5.407-4.814-5.405V7.562s-.016-.99.897-.99c.858 0 .849.99.849.99l.007 3.583s-.004.172.167.172c.16 0 .141-.172.141-.172l.01-5.926s-.055-1.162.966-1.162c1.04 0 .983 1.142.983 1.142v5.611s-.005.204.152.204c.168 0 .154-.206.154-.206l.01-6.693S11.18 3 12.202 3Z"/></svg>
<div class="bclist"> ${listblokir[timeZone]}
<div class="listbc_ulli">
<b>block list</b>
${listUlli}</div></div></div></div>`;
     document.body.insertAdjacentHTML('beforeend', html);
  }
}
blokirNegara();
  /*]]>*/
</script>

Support Jika kalian suka

Trakteer Mau kodenya!

bingung cara pasangnya?

tanya admin langsung, ke group/komen aja dibawah

Group Telegram
Time Zone JavaScript

Posting Komentar:

4 Komentar

  1. #Question...
    Dida
    I think they can still access the site. Instead of using time zones, I use a third-party API called ipapi.co to figure out the visitor's country based on their IP address.
  2. #Reply... Dida
    MAGIC Reincarnated
    It can still be accessed via VPN,
    Or obfuscated via VPN.
  3. Dida
    I know, but not all users are using VPNs. It's just a simple coding, and it's difficult to completely prevent users from using VPNs or proxies. But do you know how to detect users who bypass? Does Cloudflare need a domain to use their blocking system?
  4. #Reply... Dida
    MAGIC Reincarnated
    There is no way to detect bypass. Well you need a domain to connect with cloudflare...
Tinggalkan komentar Jika suka dengan kontent ini
Masukkan URL Gambar (imgbb) / (im.ge) atau Potongan Kode, atau Quote, lalu klik tombol yang kamu inginkan untuk di-parse. Salin hasil parse lalu paste ke kolom komentar.


image quote pre code