Excellent, many thanks, works great! Sorry, a further question – is there any way to encrypt the passwords in the config.php file? I tried a md5 convert, but it didn’t seem to work.
You would want to keep the md5 hashes of the passwords in the config.php file? It should work out if you edit line 125 from AdminLogin.class.php from ” array_key_exists($password, $this->password) ” to ” array_key_exists(md5($password), $this->password) ”.
Ps. You can check the md5 hash of the password you will need to store by adding ” <?php echo md5(“Your_password”); ?> ” in a file and then browsing to it on your browser.
1) Will this script allow visitors to register, but not be approved UNTIL I manually approve them?
2) Is the admin given an email notice when a new signup occurs?
Bonjour, Une version française est en cours ? Puis-je protéger des pages éditée sur IWEB ? Combien de pages puis-je protéger ? Merci beaucoup.
Bonjour,
There is no French version coming. However, the script can be used with any language. The login messages shown in the demo can easily be edited from configuration file or not used at all. There is no limit to how many pages you can protect.
iWeb does not support PHP (which is required) on it’s own, but you could (probably, not tested) open up the html files generated from iWeb and add the PHP code lines provided to top of iWeb html pages. I am not sure how easy it would be.
Google Translate:
Il n’ya pas de version française à venir. Cependant, le script peut être utilisé avec n’importe quel langage. Les messages de connexion montré dans la démo peut facilement être édité à partir de fichier de configuration ou pas du tout utilisé. Il n’y a aucune limite au nombre de pages que vous pouvez protéger.
iWeb ne supporte pas le PHP (qui est requis) sur son propre, mais vous pouvez (probablement, non testé) d’ouvrir les fichiers HTML générés à partir d’iWeb et ajoutez les lignes de code PHP fourni en haut des pages html iWeb. Je ne suis pas sûr de savoir comment il serait facile.
Hi
A client has asked if I can password protect a page on her website where her staff (4 members) can each access the page with a username and password.
Would this be suitable for what she wants?
Many thanks
Suzanne
Hello,
Yes you can do that. In the users file, you would need to declare the 4 members (name, password and access level) and in the page you want to protect, you’ll need to do a check for a matching access level requirement.
It’s all explained in the documentation which is included with the purchase, but if you need any help, please send me a email.
Is there a limit to the number of users? They will all go to the same page.
I’m thinking of using this for a client who is a specialty wholesaler. He wants the public to be able to view products and be able to find retailers, but only sales associates to view prices.
- Has been a member for 1-2 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Bought between 50 and 99 items
- Europe
Hi! Can I use the opportunity to enter only a password without entering a user name?
I got this error below: Parse error: syntax error, unexpected T_CLASS in /home/user/public_html/lib/classes/ProtectYourPages.class.php on line 3
Any help is highly appreciated. thanks
Will this protect a HTML page?
thanks
The page needs to be .php to load the script, but the rest of the page can be regular HTML .
For example, you could add at the top of your file:
<?php
define('ROOT', dirname(__FILE__));
include ROOT."/lib/bootstrap.php";
if ( User::getUser()->logged_in == false ) {
header("Location: login.php");
exit();
}
?>
Your HTML code in here. Shown only for users who are logged in.
Hi, Would I be able to password protect a folder for a member area rather than the individual pages? Cheers Tony


145 Purchases
29 Comments