Php Chinese verification code implementation method _ PHP Tutorial

Source: Internet
Author: User
Php Chinese verification code implementation method. Php Chinese verification code implementation method this article describes the php Chinese verification code implementation method. Share it with you for your reference. The specific analysis is as follows: the specific code is as follows: 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

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

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

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

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.