qinst64 / easy-login
A material design layer added before any webpage to request login with password
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/qinst64/easy-login
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-12-21 03:01:23 UTC
README
easy-login
A material design layer added before any webpage to request login with password.
Very easy to use with only several lines of code.
Features
- Light and easy to use with only several lines of code
- Material design interface, friendly to both pc and phone
- Support multiple users, valid durations, background image etc
How to use
-
prepare php library
-
method 1
Copy "EasyLogin.php" to your local
Then use:
include 'folder-to-file/EasyLogin.php';
-
method 2
Install through composer
composer require qinst64/easy-login dev-masterThen use:
require 'folder-to-file/autoload.php';
-
-
add the following code at the top of your entry php (e.g. index.php)
//config options $opts = array( 'id_entry' => 'duSWnS1sW', 'title' => 'Login', 'usr_pwd' => array('usr1'=>'pwd1','usr2'=>'pwd2'), 'duration' => 5, 'background_img'=> 'login_bg.jpg', ); //request EasyLogin (new EasyLogin($opts))->login();//or (new EasyLogin())->set($opts)->login();
Options explained
id_entry differentiate multiple entries, use random string (required)
title Title shown in page, default is 'Login'
usr_pwd username and password pairs (at least one required)
duration how long (hours) to make it valid (default: 72 )
background_img background image (default: NULL)
Tips:
- Two webpages with the same 'id_entry' if you want to visit both pages by only login once
- Change 'id_entry' vaule to make existing login invalid
Live demo
note: users and passwords as above.