Blog Inspirasi Digital

Blog Inspirasi Digital

Tutorial Mikrotik, Hotspot, Blog, SEO, WEB 2.0, HTML, CSS, Javascript dan Inspirasi Digital

Otomatis Expired Hotspot Tanpa Proxy Mikrotik

Membuat halaman otomatis expired hotspot tanpa proxy siap pakai.



Download dulu "expired.html" disini

kalau sudah masukan "expired.html" kedalam bagian folder hotspot, kemudian Silahkan edit halaman "login.html"

cari </body> dan letakan script dibawah ini diatasnya
<script type="text/javascript">
var error = "$(error)";
if (error == "user $(username) has reached uptime limit") {
window.location.href = "http://$(hostname)/expired.html";
} else if (error == "user $(username) has reached traffic limit") {
window.location.href = "http://$(hostname)/expired.html";
} else if (error == "no more sessions are allowed for user $(username)") {
window.location.href = "http://$(hostname)/expired.html";
} else if (error == "session limit reached ($(error-orig))") {
window.location.href = "http://$(hostname)/expired.html";
} else if (error !== "") {
window.location.href = "http://$(hostname)/error.html";
} else { document.write("$(error)"); }
</script>

selamat mencoba :D

notes: script ini bukan buatan saya, saya hanya modifikasi, entah punya siapa, karena sudah lama saya pake.

BERI KOMENTAR

Maaf untuk sementara waktu komentar di blog ini di nonaftifkan.

 

Back to Top