Giter VIP home page Giter VIP logo

captcha-library-for-codeigniter's Introduction

	Original Source : Pavel Tzonkov <[email protected]>
	Source Link : http://gscripts.net/free-php-scripts/Anti_Spam_Scripts/Image_Validator/details.html
	
	CodeIgniter library created by : 
		Mohammad Amzad Hossain
		http://tohin.wordpress.com
		
	
	License: Have Fun 
	
	# How To Use In CodeIgniter 
	
		// First Store Some fonts in fonts folder 
		// You can choose a font_name by overriding default value or this 
		// will randomly select a font.
		
	
		// In Controller 
		
			$this->load->library('antispam');
			$configs = array(
					'img_path' => './captcha/',
					'img_url' => base_url() . 'captcha/',
					'img_height' => '50',
				);			
			$captcha = $this->antispam->get_antispam_image($configs);
			
		// $captcha is an array exmaple
		//  array('word' => 'sfsdf', 'time' => time , 'image' => '<img .... ');
		
		
		// In View Print the $captcha['image'] to show captcha image.
		
		
	// Future Extension 
	
		Generated Captcha images always stored in captcha folder which is memory consuming
		unless you clear them out manually. 
		
		Looking for a feasible idea to delete them all.
		
		
Available Parameters FOR Configs: 

	'img_url' 		=>  Image URL 
	'img_path'		=> Image PATH
	'img_width'		=> Image Width
	'img_height' 	=> Image Height

	'font_name'		=> Font Name example Test.ttp
	'font_path' 	=> FONT PATH
	
	'font_size'		=> 	15
	
	'char_set' 		=> "ABCDEFGHJKLMNPQRSTUVWXYZ2345689";
	'char_length' 	=>	integer captcha word length in character
	
	'char_color' 	=> 
						Example :   "#880000,#008800,#000088,#888800,#880088,#008888,#000000";  
						This colors will be randomly use for character coloring.
	
	
	
	'line_count'	=>	10;		Number of lines to Create Noise	
	'line_color'	=> 
						Example: "#DD6666,#66DD66,#6666DD,#DDDD66,#DD66DD,#66DDDD,#666666"
						This colors will be randomly use for line coloring.
	
	 
	'bg_color'		=>	'#FFFFFF';		Captcha Image Background Color

captcha-library-for-codeigniter's People

Contributors

neotohin avatar

Watchers

ReNiSh A R avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.