PHP Chinese Verification Code implementation method, _php tutorial

Source: Internet
Author: User

PHP Chinese Verification Code implementation method,


In this paper, the implementation method of PHP Chinese verification code is described. Share to everyone for your reference. The specific analysis is as follows:

Let's look at the following:

The specific code is as follows:

<?php/********************************** code by gently* 24/07/07* Solemn declaration: The Verification Code for the program randomly generated, "some kind of coincidence" word combination is normal phenomenon, * Some people who have ulterior motives do not exaggerated! *power by Zendstudio.net*********************************/session_start (); Header ("Content-type:image/png"); $w = $h =60; $fontface = "C:\WINDOWS\Fonts\MSYH. TTF "; Font file $STR = " They take me to he will do when to move domestic one is work on the annual order of the Ministry of the People can be out of the party into the great and big This is the main person in order to learn subordinate to a peer to say that the life of a lot of leather after the child self-social plus small machine also through the power line of high-volume long party to the real home fixed deep method of water physical and chemical dispute is two from the Miyoshi 10 war no agricultural and other anti-body road map to the new opening of the knot in the first Things from when the two also gifted team to the point of fertility and the inner part of the cause of the day by the pressure of the gas industry on behalf of the whole group number of fruit phase guide the basis or the moon hair, such as the shape of the heart-like dry are to turn off the question ratio exhibition that it did not look at the most and outside of the five solutions to the Lin Mi Qun head meaning only four ma-Ming Wen Tong, but the bar and the male hole leader inflow into the seat of the EQ and fly crude oil put up the problem of quality refers to the establishment of the area of the test live Hereby, often stone strong soil less has root of the total alignment of the general type of conversion nine you take the west holding the total material re-election of the concept of seven, the mountain-pass hundred more see must be true to protect the Heat committee hand to the branch has been to repair the heath a few first avoid special what type six with an indication of the return of each east of the wind back to the south-canton of the north of the road to make a car to do business by the whole set number of Levin installed, namely, the unknown axis research monochrome solid-fast anti-Slavs set up the field weaving calendar Flowers by To find out the fault condition of mining fine gold boundary products to the boundary clearance to million accurate book operation factory must be away from the re-head of the sea-right vote children green only certificate of low cross-border eight test regulation of the near-to-the-gate iron need to go to the county soldiers solid removal of the same as the lead teeth thousand wins a brief review on the leaf rate of the white lattice effect of the fine shadow in the selection of the blade ratio of the current election to the second half of the enemy began to apply sound to the recovery of the name of the red continuation of the drug mark is difficult to keep the weight of the body tight liquid of the lower dimension plate of the reduction of the base bed field Potential end sense toward God he cun structure illumination capacity not to engage in the sub-mill Group fire Section calculation of the state-of-the-Huang clothing morning wheat cutting letter row station sound of the hit Su Zhangmi hou Cao He tree fertilizer in the right side of the city of the left page anti-su show bitter British fast called bad move about Pakistan Timber Province black Wuppe Hati only needle How to implant the King eye she grabbed the side of the seedling to talk about the source of the surrounding food injection of acid old but sufficient short-stroke Xuan fall The first ruler wave bearing powder to practice the fish with the test The Mitsuo is enough to lose the pack to promote the branch of the stem Zhou Yan Division Cuschun Ultra-negative sand seal change too mold poverty reduction Yangyangiang analysis mu of wood words ball to medical school ancient rice song listen to the only lose slip station another Wei drum just write Liu Weilio fan for a piece of work set a friend limit surplus rewind roll create law rain let bone far help first skin broadcast gifted accounted for death poison Circle Wei Ti Xun control excited to call Cloud mutual crack grain Masterbatch practicePlug steel top strategy double stay wrong to absorb resistance so inch shield late silk welding power Plant pro-hospital cold-bomb wrong scattered commercial visual arts out of the 0 room light blood times the lack of the pump observation of urban Chong spray soil simply no column Li Huanpan magnetic male like trapped Shong off delivery slave side run cover swing from the touch of the star Pine to win the independence of the officials of the mixed Ji-yi-qi-guan wide Winter chapter of the wet-biased grain to eat the valve mining village responsible for the hard price of a pre-vocational evaluation of the back of the damage cotton invasion of ash, although spear thick luo mud The egg chest palm oxygen loving stop once dissolved camp finally outline Meng money to do the Russian shrinking sand back Chen beg the weapon carrier young which Peel forced spin the groove down to hold the arm still AH fresh bar card coarse medium drill weak feet afraid of salt end Yin Feng Fog Crown C Street Lai Pui spoke intestines pay Ji Infiltration Rui surprised Dayton squeeze seconds hang Sam rotten sugar Sheng concave tao word late silkworm billion moment Kang by the garden cavity order fragrant Meat Brother house sensitive to print bee urgent take spread the fly dew nuclear margin Rang Central Wu region very quick-hui order free paper Night Township long scribe cylinder clip read LAN Anh Ditch b Confucianism kill vapor phosphorus difficult crystal plug the Flame huan Iron supplement Our Bud Yongwa pour array carbon show Wei tooth Bud Yong wa Oblique irrigation Eugeshun Pig Yang Rot please the meridian of the pulse should be laughed if the tail of the strong Spike Chu Han more green drag cattle part dyeing both autumn and forge Jade Summer healing Kinguizhou visit Blowing Rong Copper along for the rollers to call the dry understanding thorn brain in the possession of the furnace shell sulfur coal ying casting sticking to the good fortune Long smoking sentence pure gradually tillage run ze slow-planting Rutch the tide cross-cut cone Hitch defeat ship false light that the Zhehwai cut pendulum tribute to the strength of the money instrument sunk hemp sin ancestral car wear cargo pin Zimping draw feed Dragon Storehouse defend build house song Han Xi elder brother Wash Eclipse the waste of the abdomen to the record mirror of the women's fat zhuang rub risk like the clock shake the handle of the bamboo Valley selling chaos Bridge Ober to catch up with the wall of the net cross-section of the plot to hang a lesson town of the aid of the Fu Qing gather around Mo busy dance encounter So Gu Glue Yanghu nail benevolence sound trace broken extension lamp Avoid the flood the Emperor Liuha Jie Gannon the general Constitution thick island attack who Honche cannon spot to know the Spirit egg closed children release milk giant private silver Ychintan fatigue mold Dulle Isolated bending results recruit Shaoxing hu Call Pain Peak 0 Diesel spring Shang Dingqin slightly chasing beam depletion alkali shu-gang digging blade pile-up Chest Heng Qin film articles in the case of seedling slow convex service shears Sichuan snow chain fishing, face-to-heart, buy Yang Zongjio race flag filter Silicon Charcoal The unit sits in the steam to sink the gun to save the dark hole to take the bucket you the song-Arc explosion fallacy Tu Jin arm barrier brown land Ah Jian Zun Bean pull mo thumper around seam police pick dirty ice Cambodian mouth what rice plastic send Zhao shout mat dan Watanabe planing Tiger pen dilute kun lang tea dripping shallow hug acupoint covered LUN Niang ton of dip sleeve beads Female mother purple drama Tower Hammer earthquake old appearance clean cut the front of the fire, the Flash PO fierce sue brush hard and sudden disaster, Joe Tang leak smell shen melt chlorine waste stalk male where rob like pulp beside the glass also loyal sing to catch lock especially multiply Uzhi pale permit rebel prisoners feel rust sweep Bilibao core ye kam secret clean jiang calcium shoulder teng withered throw rail church mixed dad 祝励 Ken Wine rope Poor pond dry bubble bag long feeding aluminum soft channel of habitual trade dung comprehensive wall trend of the anti-dumping air clothing Sun Ling Ridge cheat Hugh Borrow "; $code =" "; for ($i =0; $i <4; $i + +) {$Xi =mt_    Rand (0,strlen ($STR)/2);    if ($Xi%2) $Xi +=1; $code. =substr ($str, $Xi, 2);} $_session[' code ']= $code; $im =imagecreatetruecolor ($w, $h); $bkcolor =imagecolorallocate ($im, 250,250,250); Imagefill ($im, 0,0, $bkcolor);/*** add Interference ***/for ($i =0; $i <15; $i + +) {$fontcolor =imagecolorallocate ($    Im,mt_rand (0,255), Mt_rand (0,255), Mt_rand (0,255)); Imagearc ($im, Mt_rand ( -10, $w), Mt_rand ( -10, $h), Mt_rand (30,300), Mt_rand (20,200), 55,44, $fontcolor);}    for ($i =0; $i <255; $i + +) {$fontcolor =imagecolorallocate ($im, Mt_rand (0,255), Mt_rand (0,255), Mt_rand (0,255)); Imagesetpixel ($im, Mt_rand (0, $w), Mt_rand (0, $h), $fontcolor);} /*********** content *********/for ($i =0; $i <4; $i + +) {$fontcolor =imagecolorallocate ($im, Mt_rand (0,120), Mt_rand (0,120) , Mt_rand (0,120));    This guarantees a darker color at random.    $codex =iconv ("GB2312", "UTF-8", substr ($code, $i *2,2)); Imagettftext ($im, Mt_rand (20,24), Mt_rand ( -60,60), 40* $i +20,mt_rand (30,35), $fontcolor, $fontface, $codex);} Imagepng ($im);? >

I hope this article is helpful to everyone's PHP programming.

http://www.bkjia.com/PHPjc/1019053.html www.bkjia.com true http://www.bkjia.com/PHPjc/1019053.html techarticle The implementation method of PHP Chinese verification Code, the example of this paper describes the PHP Chinese verification Code implementation method. Share to everyone for your reference. The specific analysis is as follows: First look at the following: specific code such as ...

  • 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.