Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
How to make an password protected client?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="JynX" data-source="post: 423030" data-attributes="member: 66193"><p>While this probably isn't the most efficient way to go about things as it can be leaked/shared quite easily and something more like just a rank check to deny access would probably be much more efficient for something like this. You could also even add a column into the users table called like `beta` and then by default make it 0. When a user attempts to visit the page you can check if their `beta` column is set to 1 and if so allow access if not, deny access or just do a header redirect. Up to you.</p><p>[PHP]<?php</p><p>$successStatus = false; // Set the success status as false before submission</p><p>if (isset($_POST['passwordSubmit'])) { // Check to see if the form has been submitted</p><p> if ($_POST['passwordValue'] == "PUT YOUR PASSWORD HERE") { // Edit password here</p><p> $successStatus = true; </p><p> }</p><p>}</p><p></p><p>if (!$successStatus) { // Check if the value of $successStatus is false</p><p> echo '<html></p><p> <head></p><p> <style></p><p> body {</p><p> margin:0px;</p><p> padding:0px;</p><p> font:12px \'Lucida Grande\',Arial,sans-serif;</p><p> background-color:#000000;</p><p> }</p><p> .box {</p><p> width:300px;</p><p> margin:30px auto;</p><p> background-color:#fff;</p><p> border:1px solid #dcdada;</p><p> padding:5px;</p><p> -webkit-border-radius: 4px;</p><p> -moz-border-radius: 4px;</p><p> border-radius: 4px;</p><p> }</p><p> .error {</p><p> background-color:#ffbcbb;</p><p> border:1px solid #ff7777;</p><p> padding:8px;</p><p> margin-bottom:4px;</p><p> }</p><p> input {</p><p> padding:4px;</p><p> }</p><p> input[type=password] {</p><p> border:1px solid #dcdada;</p><p> width:230px;</p><p> -webkit-border-radius: 4px;</p><p> -moz-border-radius: 4px;</p><p> border-radius: 4px;</p><p> }</p><p> input[type=submit] {</p><p> width:65px;</p><p> }</p><p> </style></p><p> </head></p><p> <body></p><p> <div class="box"></p><p> <form method="post"></p><p> <input type="password" name="passwordValue" placeholder="Enter password here.."></p><p> <input type="submit" name="passwordSubmit"></p><p> </form></p><p> </div></p><p> </body></p><p> </html></p><p> ';</p><p>}</p><p>?></p><p>[/PHP]</p><p>To use this simply edit the bit that says "Edit password here" to a password of your choice and then paste the entire code into the top of your client.php file located in app/tpl/skins/SKIN HERE/</p><p></p><p>Credits to the people that created Hablore's pin system as I took most parts of it and just edited it to fit this scenario and give an alternate option to Gang67's.</p></blockquote><p></p>
[QUOTE="JynX, post: 423030, member: 66193"] While this probably isn't the most efficient way to go about things as it can be leaked/shared quite easily and something more like just a rank check to deny access would probably be much more efficient for something like this. You could also even add a column into the users table called like `beta` and then by default make it 0. When a user attempts to visit the page you can check if their `beta` column is set to 1 and if so allow access if not, deny access or just do a header redirect. Up to you. [PHP]<?php $successStatus = false; // Set the success status as false before submission if (isset($_POST['passwordSubmit'])) { // Check to see if the form has been submitted if ($_POST['passwordValue'] == "PUT YOUR PASSWORD HERE") { // Edit password here $successStatus = true; } } if (!$successStatus) { // Check if the value of $successStatus is false echo '<html> <head> <style> body { margin:0px; padding:0px; font:12px \'Lucida Grande\',Arial,sans-serif; background-color:#000000; } .box { width:300px; margin:30px auto; background-color:#fff; border:1px solid #dcdada; padding:5px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .error { background-color:#ffbcbb; border:1px solid #ff7777; padding:8px; margin-bottom:4px; } input { padding:4px; } input[type=password] { border:1px solid #dcdada; width:230px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } input[type=submit] { width:65px; } </style> </head> <body> <div class="box"> <form method="post"> <input type="password" name="passwordValue" placeholder="Enter password here.."> <input type="submit" name="passwordSubmit"> </form> </div> </body> </html> '; } ?> [/PHP] To use this simply edit the bit that says "Edit password here" to a password of your choice and then paste the entire code into the top of your client.php file located in app/tpl/skins/SKIN HERE/ Credits to the people that created Hablore's pin system as I took most parts of it and just edited it to fit this scenario and give an alternate option to Gang67's. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
How to make an password protected client?
Top