Community Page
- www.phpfour.com/blog Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Thanks for the sharing.
- Twe2 as it is now is no more!
- Hello Austin, good to know the base class helped you. And thanks for sharing the snippet for allowing multiple items :)
- Sorry, you have to redirect to Paypal's website for payment - it is mandatory.
- Thanks
Md Emran Hasan (phpfour)
This is Emran Hasan's blog for PHP, CSS, XHTML, JavaScript, Web 2.0, AJAX, Usability, and Web Standards related views, ideas, and sharing.
This is a library designed to run with Code Igniter that allows the application to protect any folder in the webserver using the htpasswd method of Apache. It can also group the users and create group based permission on the folders. The use is very simple: you need to define an array of
... Continue reading »
1 year ago
ServiceAuthentication
or
AuthHtpasswd
1 year ago
1 year ago
Thanks! :)
1 year ago
but i check the $this->load->library('AuthHtpasswd');
is ok . But i do not know why it gets error. However to check your example i try it different way $auth=new AuthHtpasswd();
and it works. but i know it must be work , in the way done. Can u tell me what type mistake may be i have done to run your script.
Thanks
http://saidur.wordpress.com
1 year ago
Thanks for your reply. I've just found the problem - while Code Igniter loads any library, it puts the name in small case. So, instead of calling $this->AuthHtpasswd->protect(..), please call $this->authhtpasswd->protect(..).
I have made change to the code and re-uploaded it.
Thanks
1 year ago
nice to see you continuing your blog :)
just a small tip -
"class Protect extends Controller"
as i can see your "Protect" class has extended "Controller"
so you should name like this -
"ProtectedController"
or "SecureController"
or "AuthenticateController"
hope that will be in help.
best wishes,
1 year ago
you don't need to put @author tag with every function :)
instead try once on the top class level.
1 year ago
Thanks for your suggestions ! I will keep the @author thing in mind for future use.
Regarding the controller name, Code Igniter requires writing controller name without the Controller suffix, as this becomes a part of the url:
http://www.domain.com/protect/index
Thanks for your comments, its been long you've visited my blog :)
Cheers!
1 year ago
thank you for mentioning about the Code Ignitor specific convention. i didn't know that, how is going everything ? how is going study and new company ???
hope will c you soon.
best wishes,
1 year ago
Study is almost done...final exams of the last sems remaining and then the internship.
Company is doing well by the grace of Almighty. We're working with cool, new stuffs and discovering new things every now & then. And our 2nd recruitment is going on, possibly new team will start from Oct 1.
Will come to swi next week, will meet then. Take care!
10 months ago
10 months ago
After a successful subscription through your registration form OR admin panel, take an array of all the valid users from DB and use the class to create the .htaccess file for the folder.
Also, when a subscription is over, OR an user is deleted from admin panel, do the same to update the .htacess file.
Hope this helps.