Veriword is a PHP Captcha system thats generate a question in form of an image with random baffle text or in another form such as an animated flash. The class is capable of picking a random word, generate captcha and store the word in an encrypted session variable for posterior validation eventually in a form on which it is used to prevent robots to have automated access.
Current features of VeriWord are:
A. Generation and rendering of Captcha images (as JPEG/PNG/GIF/WBMP) or flash (as SWF) at runtime for inclusion in an existing entry form. VeriWord use captcha engine (see class.captcha.php) which uses three other classes to compose captcha. These classes are:
1. WordGenerator (class.wordgenerator.php) generates random word from dictionary file or create spelled random word. Three type of random word are:
> DictionaryWord, pick a random word from dictionary.
> SemiDictionaryWord, pick a random word from dictionary then plus with random suffix.
> RandomWord, pick a nonsence word by composing consonants and vowels, so the word can be spelled by human.
2. WordArt (class.wordart.php) creates distorted word with random TrueType fonts from font directory. This class calls Filter to create baffle text of the word. Check existing filter on class.filter.php, you may add your filter to make your captcha is unique than others. Two type of WordArt are:
> Linear, write a word in linear manner.
> NonLinear, write a word in various size, angle, vertical position for each characters.
Some existing filters are:
> Wavy, distort a word image by waving object using sin or cos functions.
> Bubbly, disturb a word image by filling object with tens of bubbles.
> BreakType, distort a word image by reducing pixels.
3. NoiseGenerator (class.noisegenerator.php) picks a random background from noise directory or create one on the fly. These types are:
> BackgroundNoise, pick a noise image from noises directory. The image format can be JPEG or GIF with dimension about 100 x 50 pixles.
> RandomNoise, create a noise image on the fly by drawing lines in a range of angles. You may add or change the way of noise creation, for example grid background or gradient color background.
o Expecially for FlashCaptcha (class.flashcaptcha.php), this flash is created using Ming module (make sure you use the latest version), the captchaing is done by disturbing the word with animated bars and bubbles, the human still able to read the word but robot can't.
B. Configuration made in veriword.ini file that parsed by ConfigReader (class.configreader.php), this parsing done in VeriWord creation.
C. Store random word in md5 encrypted session variable.
D. Verify the posted word using VeriFicator class. At the present, this class only has one job, that is verifying the word. Next time, I want to add the capability by extending more functionalities, such as monitoring, tracking or banding.
This class can be used to serialize and unserialize PHP variable values in the JSON format (Javascript Object Notation).
It can take a variable value of any PHP type and generates a string that represents that object in JSON format.
The class can also do the opposite, i.e. take a string with a value represented in a JSON format and recreate a PHP variable value of the type defined in the serialized JSON string.
Template engine for PHP that allows to store your html code apart from your php code. It was tested with php 3.0.11.
It features:
- Simple variable interpolation ( {STUFF} )
- Array variable interpolation for eg. {ROW.ID} {ROW.NAME} {ROW.WHATEVER}, you assign an array to the variable ROW once
- Global PHP variables available without making assigns for eg. {PHP.HTTP_HOST} {PHP.PHP_SELF} or any variable: {PHP.session_id}
- Assign using arrays for eg. $xtpl->assign(array(STUFF=>"kewlstuff",ROW=>$row));
- Default nullstring for unassigned variables and unparsed blocks, custom nullstring for every variable or block
- Dynamic blocks:
- Multiple level dynamic blocks (nested blocks)
- Autoreset feature (do not reset subblocks when reparsing parent block)
- recursive parse to parse all subblocks of a block
- File(template) include: {FILE "another.template.xtpl"}, the included templates can also contain includes recursively.. uses fopen so you can include http:// and ftp:// files too
- Very simple and powerful syntax, you'll love it :)
The code is very short and very optimized, according to my speed tests it's the fastest template engine around which can do nested blocks and variables..
The basic syntax is from FastTemplate and QuickTemplate (http://phpclasses.upperdesign.com/browse.html/package/49), but the entire class was written by me from scratch in one day, without a line from other
template engines. THIS IS NOT A REWRITE OF OTHER ENGINES!
The algorithm used makes this code amazing fast, you can do a bunch of nested dynamic blocks and everything you want, because it doesn't use recursive calls to build up the block tree.
Contains 7 examples (which covers all features i think), I tried to write them so even newbies should understand easily.
Docs and some functions i didn't need (clearing variables, etc) are still missing, but they'll come.
Current version is 0.2.4.
Licensed by LGPL.
WARNING: these files are outdated, the latest versions available from the project homepage: http://xtpl.sourceforge.net/
Ratings
Utility
Consistency
Documentation
Examples
Tests
Videos
Overall
Rank
All time:
Good (81.8%)
Good (81.8%)
-
-
-
-
Not sure (49.1%)
1563
Month:
There are not enough user ratings to display for this class.
This class can be to register objects and variables accessible from any application scope.
It creates a registry to store and retrieve values of objects and variables that can be accessed using this class static function calls. That allows the use objects as singletons.
The class provides functions to add, remove, check the existence of object variables to the registry, as well clear all the entries previously stored in the registry.