Download .zip |
Info | Example | View files (3) | Download .zip | Reputation | Support forum (2) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2017-10-14 (2 years ago) | Not enough user ratings | Total: 151 | All time: 8,721 This week: 344 |
Version | License | PHP version | Categories | |||
rndkvp 1.0.0 | Public Domain | 5.6 | PHP 5, User Management, Validation, S... |
Description | Author | |
This class can authenticate human users using random value pairs. Recommendations Captcha process for multiple php program files |
|
Class: random key value pair authentication Version: 0.1 10/14/2017 Released into the public domain Description: This class will authenticate human submissions through random key value pairs. Installation: Upload files to a web accessible location on your server (eg. public_html) Configuration: No configuration needed. Usage: This class uses a serialized object to store the last key value pair for authentication in the session. If you don't know what I am talking about, that is okay, it just means that you must instantiate the class after the session has been started. This allows human verification without any intreaction with the human. session_start(); include('rndkvp.class.php'); if( empty($_SESSION['humanCheck']) ){ $humanCheck = new rndkvp(10); }else{ $humanCheck = unserialize($_SESSION['humanCheck']); } 1. If the session has not been started elsewhere, start it before instantiating the class. 2. Include the class file. 3. If the class object has not already been saved to the session, instantiate as normal, otherwise load it from the session. rndkvp takes 1 argument... length = length of the generated key value pairs, defaults to 8 After all processing has been completed, the object must be saved to the session... $_SESSION['humanCheck'] = serialize($humanCheck); Refer to the test.php file for usage examples. Point your browser to this file to see how it works. Methods createFormInput() creates a hidden input form field containing the random key value pairs validate( $value ) validates the submitted value resetKVP( $length ) generates new random key value pairs Changelog 0.1 Initial beta release |
Files |
File | Role | Description |
---|---|---|
manual.txt | Doc. | Usage Documentation |
rndkvp.class.php | Class | Main Class |
test.php | Example | Test usage |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Comments (1) | |||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.