It's been a long time coming, sharing something.

Source: Internet
Author: User
This post was last edited by Sibang on 2013-08-01 16:11:49

Phpgif code php GIF film??? ??

Pure PHP hand-crafted animated multi-frame GIF image verification code.
Effect Demo: Http://pcik.7di.net/pcik_reg

The effect of Baidu Demo: Https://passport.baidu.com/cgi-bin/genimage? captchaservice63636236364e55367233302f31673844526b664451665a5a4d4977466974376b707a754466777934697449455561625171346c72505 5444b51734a35376d2b4f744b6d303238315341382b354675344c3153745869487252376169752b437450515138574972436752584f53717849726f48 593258666c373574593753614f4d32703831724e51722b694a31756b67467137644c30506979496639594e504931536732687a5a50537930554455424 5724f76694a307247632b4f76426165663144732b595359394950413470476453787865564f6b506e674f7537637264526d716541377a384b48744562 4f365a4774657a58502b7347703763696d5752614171615747784e5a6c5042336634766a5049766853365974444258577968645a4f654f55

Because of my level is not good, so can't do Baidu that?? The effect,? Haihan

The captcha image is composed of multiple frames generated by PHP, so the CAPTCHA is a real animated GIF.
The way to use it is simple:
Ming
Gif???? Built?
Author:
7di.net QQ Group: 223494678
Call:

Verify:
IF (!isset ($_session[' Code ')) Or strtolower ($_session[' Code '))!=strtolower ($cod)) {
Throw New Exception (' Error: '. __line__. ',?????! ');D IE ();
}unset ($cod, $_session[' code ');

Download Address: http://download.csdn.net/detail/sibang/5852531


Reply to discussion (solution)

Good things .....

Support by the way to the point of access

Your captcha text appears in the first frame, so it's just fun.

Hope to improve!

Take a look and get a minute.

Your captcha text appears in the first frame, so it's just fun.

Hope to improve!
?,? too, I hope the Boss?? I mean, a little bit.


Your captcha text appears in the first frame, so it's just fun.

Hope to improve!
?,? too, I hope the Boss?? I mean, a little bit.
Meaning is not the verification code out of the first frame, so the crack verification code as long as the first frame can be, so improve, do not let him appear in the first frame.



Your captcha text appears in the first frame, so it's just fun.

Hope to improve!
?,? too, I hope the Boss?? I mean, a little bit.
Meaning is not the verification code out of the first frame, so the crack verification code as long as the first frame can be, so improve, do not let him appear in the first frame.
OK, change it.

Modify complete, now the first frame is the interference code, please all the guidance:

 ', Var_dump ($Imdata), ' 
';D ie ();} Header (' content-type:image/gif '); Return gif::creatgif ($Imdata); UnSet ($Imdata);} Private Static Function creatgif ($GIF _src, $GIF _dly=10, $GIF _lop=0, $GIF _dis=0, $GIF _red=0, $GIF _grn=0, $GIF _blu=0, $GIF _mod= ' bin ') {IF (!is_array ($GIF _src) &&!is_array ($GIF _tim)) {throw New Exception (' Error: '. __line__. ', Does not Supported function for only one image!! ');D IE ();} Self:: $LOP = ($GIF _lop>-1)? $GIF _lop:0;self:: $DIS = ($GIF _dis>-1)? (($GIF _dis<3)? $GIF _dis:3): 2;self:: $COL = ($GIF _red>-1 && $GIF _grn>-1 && $GIF _blu>-1)? ($GIF _red | ($GIF _grn << 8) | ($GIF _blu << 16)) :-1; For ($i =0, $src _count=count ($GIF _src), $i < $src _count, $i + +) {IF (Strtolower ($GIF _mod) = = ' url ') {self:: $BUF []=fread ( fopen ($GIF _src[$i], ' RB '), FileSize ($GIF _src[$i]));} Elseif (Strtolower ($GIF _mod) = = ' bin ') {self:: $BUF []= $GIF _src[$i];} Else{throw New Exception (' Error: '. __line__. ', unintelligible flag ('. $GIF _mod. ')! ');D IE ();} IF (! ( Substr (self:: $BUF [$i],0,6) = = ' gif87a ' Or Substr (self:: $BUF [$i],0,6) = = ' gif89a ') {throw New Exception (' Error: '. __line__. ', Source '. $i. ' is not a GIF image! ');D IE ();} for ($j = (13+3* (2 << ($BUF [$i]{10}) & 0x07)), $k =true; $k, $j + +) {switch self:: $BUF [$i]{$j}] {case '! ': I F ((Substr (self:: $BUF [$i], ($j +3), 8) = = ' NETSCAPE ') {throw New Exception (' Error: '. __line__. ', Could not make animation From animated GIF source ('. ( $i + 1). ');D IE ();} Break;case '; ': $k =false;break;}}} Gif::addheader (); For ($i =0, $count _buf=count (self:: $BUF); $i < $count _buf; $i + +) {gif::addframes ($i, $GIF _dly);} Self:: $Img. = '; '; Return (self:: $IMG);} Private Static Function AddHeader () {$i =0;if (ord:: $BUF [0]{10}) & 0x80) {$i =3* (2 << (Ord (self:: $BUF [0]{10 }) & 0x07); Self:: $Img. = substr (self:: $BUF [0],6,7]; Self:: $Img. = substr (self:: $BUF [0],13, $i); Self:: $Img. = "!\377 \13netscape2.0\3\1 ". Chr (self:: $LOP & 0xFF). Chr ((self:: $LOP >> 8) & 0xFF)." ";} UnSet ($i);} Private Static Function addframes ($i, $d) {$L _str=13+3* (2 << (Ord (self:: $BUF [$i]{10}) &amP 0x07); $L _end=strlen (self:: $BUF [$i])-$L _str-1; $L _tmp=substr (self:: $BUF [$i], $L _str, $L _end); $G _len=2 << (ord (Self:: $BUF [0]{10}) & 0x07); $L _len=2 << (ord (self:: $BUF [$i]{10}) & 0x07); $G _rgb=substr (self:: $BUF [0], 13,3* (2 << (Ord (self:: $BUF [0]{10}) & 0x07)), $L _rgb=substr (self:: $BUF [$i],13,3* (2 << (ord:: $BUF [$i] {ten}) & 0x07)), $L _ext= "!\xf9\x04". Chr ((self:: $DIS << 2) + 0). chr (($d >> 0) & 0xFF). Chr (($d >> 8 ) & 0xFF). " \x0\x0 "; IF (self:: $COL >-1 && ord (self:: $BUF [$i]{10}) & 0x80) {for ($j =0; $j < (2 << (ORD) (self::$ buf[$i]{10}) & 0x07) ($j + +) {IF (ord ($L _rgb{3* $j +0}) = = (self:: $COL >> 0) & 0xFF && ord ($L _rgb{3* $j + 1}) = = (self:: $COL >> 8) & 0xFF && ord ($L _rgb{3* $j +2}) = = (self:: $COL >>) & 0xFF) {$L _ext= "!\ Xf9\x04 ". Chr ((self:: $DIS << 2) +1). Chr (($d >> 0) & 0xFF). Chr (($d >> 8) & 0xFF). chr ($j). \x0 "; break;}}} Switch ($L _tmp{0}) {case '! ': $L _img=substr ($L _tmp,8,10), $L _tmp=substr ($L _tmp,18,strlen ($L _tmp) -18); Break;case ', ': $L _img=substr ($L _tmp,0,10); $L _ Tmp=substr ($L _tmp,10,strlen ($L _tmp) -10); if (Ord (self:: $BUF [$i]{10}) & 0x80 && self:: $IMG >-1) {if ($G _len = = $L _len) {if (Gif::compare ($G _rgb, $L _ RGB, $G _len)) {self:: $Img. = ($L _ext. $L _img. $L _tmp);} else{$byte =ord ($L _img{9}); $byte |= 0x80; $byte &= 0xF8; $byte |= (Ord (self: $BUF [0]{10}) & 0x07); $L _IMG{9}=CHR ($ byte); Self:: $Img. = ($L _ext. $L _img. $L _rgb. $L _tmp);}} else{$byte =ord ($L _img{9}), $byte |= 0x80; $byte &= 0xF8; $byte |= (Ord (self: $BUF [$i]{10}) & 0x07); $L _IMG{9}=CHR ( $byte) Self:: $Img. = ($L _ext. $L _img. $L _rgb. $L _tmp);}} Else{self:: $Img. = ($L _ext. $L _img. $L _tmp);} Self:: $IMG = 1;} Private Static Function Compare ($G _block, $L _block, $Len) {for ($i =0; $i < $Len; $i + +) {IF ($G _block{3* $i +0}! = $L _block{3 * $i +0} | | $G _block{3* $i +1}! = $L _block{3* $i +1} | | $G _block{3* $i +2}! = $L _block{3* $i +2}) {Return (0);}} Return (1);}} Get Custom background color $bgcolor= (IsSet ($_request[' C '))? $_reQuest[' C ']: ';//Gifecho Gif::init (60,23, $bgcolor);D ie ();}

This is a good thing for a novice like me! Decisive collection.

I have a decisive collection of it

I have a decisive collection of it Hey

Good, the collection of

Thanks, study.

Access points

Good good, improved better

Very good very strong!!

After the collection of more communication

LZ Refueling!

No explanation! Take a minute! Support landlord

Nice ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.