Php Chinese Verification Code Implementation Method

Source: Internet
Author: User

Php Chinese Verification Code Implementation Method

This document describes how to implement the php Chinese verification code. Share it with you for your reference. The specific analysis is as follows:

First look at the following:

The Code is as follows:

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

<? Php

/*********************************

* Code by Gently

* 24/07/07

* Solemn statement: the verification code is randomly generated by the program. The word combinations of "Some coincidence" are normal.

,

* Some people with ulterior motives should not give full play to their questions!

* Power by ZendStudio. Net

*********************************/

Session_start ();

Header ("Content-type: image/PNG ");

$ W = 180;

$ H = 60;

$ Fontface = "C: \ WINDOWS \ Fonts \ MSYH. TTF"; // font file

$ Str = "when I come to him, I want to work in China. First, I want to work in order to become a citizen.

When there is no such thing, the primary person is able to come to the primary school, and the lower-level students use their peers to say that they are too desperate and more sub-students.

After the social media and small machines, the main power line, the high volume of electricity, the Party has to set the depth of the Law, the table of water, physical and chemical competition, now two political and three

Before the ten-day war, there were no agricultural servers and other anti-body and fighting routes.

Batch training emphasizes its thinking and in-room removal because of the day-to-day benefits of the parts by the pressure worker gas industry on behalf of the entire group number fruit period guide each base or month Mao ran

For example, if all the scripts are directed to the change-related question library, it is the most out-of-the-box question library.

The four-way horse recognizes the article, but the article is more grams and the Public Kong leads the incoming seat, the situation, and the flying crude oil.

The establishment of the district test live is very taught here often Shi strong little Earth has been a total of Direct Group type conversion don't make cut nine you take the west holding total material

If you are re-elected to Zhiguan, you can call qimsan Cheng baibao. In addition, you must go to the beibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibeibei.com.

What type 6 shows that the secondary security belt is completed after each increase in the East, the wind is returned to the South Guang Lao Lun kebei to build a car for the festival to do business is integrated

Set no. column temperature installation that is no knowledge axis research solid color fast anti-shi Lashi set dalon field weaving calendar flowers by request pass broken condition mining fine

The gold industry product judgment parameter layer, edge clearance to the ten true research book factory must be separated from the sea to pay the right and the children's qingcai certificate lower beyond the eight tests

Guis near injection to run the bumen iron should go to the discussion County soldiers fixed removal like tooth Qian Sheng fine shadows ji bai ge effect push blank configuration knife leaf Rate

Jinxuan yangde phone investigation half the enemy's first film Shi Xiang Hua Jue name red continued average drug mark difficult deposit tester body tight liquid dispatch quasi Jin

Angle Dimension Reduction plate Xu broke the technology to eliminate the Bottom Bed field trend sense to Shen benhe village structure photo volume not engaged in sub-grinding fire section calculation according

Value of the United States Huang Yi Biao server morning shift Mai cut letter row sound the attacker Zhang mi harm Hou Cao he shufa following the right city strict diameter screw Inspection

On the left side of the page, anti-suxian, bitter English, fast, bad, migration, about the province of Pakistan, black Wu Pei, he di, only the needle, how to plant Beijing, help shengwang eyes, her grasp of containing Seedlings

Auxiliary miscellaneous talk about surrounding food shot source examples lead to acid old but enough short draw Agent Xuan Ring falls first ruler wave Bearing Powder practice House fish with test engraved rely on enough

Manfu loss of bag promote branch board mushroom rod week shield Yan instructor Qu chunyuan ultra negative sand seal for too poor reduction Yang Jiang Mu Yan

Qiuchao Medical School

Volume creation law rain let the bone far help the initial skin play excellent occupy the dead poison circle Wei Season Training Control exciting look called cloud mutual split grain mother trainer plug steel top

Policy double stay mistaken Foundation suck drag so inch shield late silk female powder Welding Power Plants cold hit the wrong bullet scattered commodity video art destroy Strong Room Light blood

Times lack of PCT pump to detect the vast Fucheng Chong spray Li wangpan magnetic Xiong seems sleepy Yi Zhou off cast to send slaves side Run cover swing distance touch

Xingsong sent to get xingdu official mixed Ji according to not burst frame Wide winter seal wet partial grain eat hold valve mine village responsibility cooked stable hard price Nuu turn Qijia

Pre-Job Evaluation reading back co-loss cotton invasion ash although the spear thick Luo mud open the egg box palm oxygen love stop once dissolved camp final gang Meng Qian to do Russia

Contraction sand return Chen Fen machinery carrying young which stripping force spin collection slot hold the load is still fresh it card rough drill by weak feet afraid of salt at the end of Yin

Fengwuguan C Street laibei Fuji xiaorui stunned crowded seconds suspension of mson sugar Sheng concave pottery word late silkworm yimoment Kang zumu

Banyuan cavity order meat younger brother house Minhui forgot to edit and print the bee rush to expand and hurt the flying dew nuclear edge game vibration operation Central Wu domain very fast and unique order free

Paper night township Jiu Li cylinder folder Nian LAN yinggou Yi Ru kill steam phosphorus Yi Jing plug igniaile iron fill bud yongwa tilting Array Carbon play Wei

Add tooth bud Yong wa oblique irrigation ou Xian shun pig foreign corruption please thoroughly store dangerous pulse should laugh if tail bundle strong violent enterprises food Sui Chu Han more green drag

Niufen dyeing both autumn times forging Yuxia treatment tip colony well Fei Zhou visit blowing Rong copper along the rolling passengers call drought Wu thorn brain to pass through the Tibet dare to make gap

Furnace Shell sulfur coal yingzhu stick probe thin ten good fortune longitudinal selection ceremony is willing to Fu residual Lei Yan smoke sentence pure cultivation run ze slow planting Lu chifan Environment

Tide off the cone Xi Chi defeat fake bright ship said to the gang Zhe Huai cut the delivery of Jin Yi Shen refining Ma sin ancestor car goods sold Qi rat

Draw painting feeding longku shouzhu Fang Ge Han Xi brother wash eclipse waste na belly almost recording mirror women evil fat village wipe danger lizan Bell shake the handle debate zhugu

Sell chaos virtual bridge Obo catch the way of the amount of wall network cut wild left quiet seek to get hanging class town arrogant Sheng aid Zha worry key Fu Qing together around the moo

Busy dance when sogu gum goat Lake dingtalk renyin trace broken stretch lights to avoid Pan death answer Yong frequency Huang Liu ha uncover ganuo almost Xian concentrated island attacked who Hong

Xie gun casting spot news understand spirit egg closed children milk giant private silver yijingtan tired Yun mold dulle Bending Performance recruit Shao Hu call pain peak

Zero firewood spring Wu jump jushang Ding Qin slightly chasing Liang discount alkali shugang dig the blade drama hehehe chest Heng Qin film published in the case

Slow convex slice face slice blumeng buy Yang zongjiao saqi filter silicon carbon stocks sit Steam Condensate actually trapped gun Li rescue take

Dark hole criminal tube you song arc burst paradox tu flavor Jin arm barrier brown Lu Ah Jian Zun bean pull Mo against Sanpo sewing police pick dirty ice Cambodia mouth what rice

Plastic send Zhao shouting pad Dan du ear planing tiger pen thin Kun langsa tea drop showner cave covered Lun Niang tons of dipped sleeves beads female mother Purple Play tower hammer earthquake

Old appearance Jie Section Prison Feng suspected overlord flash Po fierce complaints brush malicious and disaster-stricken Qiao Tang leak smell Shen melting chlorine shortage stems man who snatched like pulp beside Bo also

Zhong sang Meng Yu Fen catch the lock, especially by Wu Zhi Dan Yun rebellion animal capture touch rust sweep bibao core ye Jian secret Jing Jiang calcium shoulder Teng dry throwing rail

Tang mix dad follow the lure Zhu liken wine rope poor Tang dry Bubble bag Lang feed aluminum soft canal used trade dung full wall trend his ink congestion Qi reverse unload

Hang Yi Sun Ling lie to Hugh ";

$ 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

(1, 0,255), mt_rand (0,255 ));

Imagearc ($ im, mt_rand (-10, $ w), mt_rand (-10, $ h), mt_rand

(30,300), mt_rand (20,200), $ fontcolor );

}

For ($ I = 0; I I <255; $ I ++ ){

$ Fontcolor = imagecolorallocate ($ im, mt_rand (0,255), mt_rand

(1, 0,255), mt_rand (0,255 ));

Imagesetpixel ($ im, mt_rand (0, $ w), mt_rand (0, $ h), $ fontcolor );

}

*********/

For ($ I = 0; $ I <4; $ I ++ ){

$ Fontcolor = imagecolorallocate ($ im, mt_rand (0,120), mt_rand

(0,120), mt_rand (0,120); // This ensures that the random color is darker.

$ Codex = iconv ("GB2312", "UTF-8", substr ($ code, $ I ));

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 will help you with php programming.

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.