Notification texts go here Contact Us Buy Now!

Welcome To AL-AMIN

Hi Dear : Read my guides in which I've shared my knowledge and experiences. I will keep updating my website with great information for all of you.

  See More Tutorials Here →

Blogger Post Password Protected Script

blogger post password protected script (1st)

<script type="text/javascript"> var password = 'molla@123' password=prompt('Please enter the password to enter this page:',''); if (password != 'molla@123') { location.href='Webpage URL Here'; } </script>

blogger post password protected script (2nd)

<style> .password-container { max-width: 900px; margin: 50px auto; padding: 20px; border: 1px solid #ccc; border-radius: 10px; display: none; } .password-input { width: 95%; padding: 10px; margin: 10px 0; border: 1px solid #ccc; border-radius: 5px; } .password-button { width: 100%; padding: 10px; background-color: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer; } .password-button:hover { background-color: #45a049; } #protected-content { display: none; padding: 20px; border: 1px solid #ccc; border-radius: 10px; margin-top: 20px; } </style> <script type="text/javascript"> function setCookie(name, value, days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + (value || "") + expires + "; path=/"; } function getCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } function checkPassword() { var password = document.getElementById("password").value; if (password === "A123@#") { setCookie("passwordProtected", "true", 30); // Change 30 to the desired number of days document.getElementById("protected-content").style.display = "block"; document.getElementById("password-form").style.display = "none"; } else { alert("Incorrect password. Please try again."); } } function checkCookie() { var isProtected = getCookie("passwordProtected"); if (isProtected) { document.getElementById("protected-content").style.display = "block"; } else { document.getElementById("password-form").style.display = "block"; } } window.onload = function() { checkCookie(); } </script> <div class="password-container" id="password-form"> <h2>Protected Page</h2> <input class="password-input" id="password" type="password" /> <button class="password-button" onclick="checkPassword()">Submit</button> </div> <div id="protected-content"> <!--Your protected content goes here--> </div>

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.
Contact Us