后端开发|php教程
screenshot,lt,gt,Score,NAME
后端开发-php教程
PHP绘图函数生成图片验证码
钱袋子源码,vscode代码提交git,ubuntu全屏太小,nginx取代tomcat,sqlite免费版下载,前端3d动画用什么框架,python 爬虫的方向和出路,php 5.4 curl,安徽seo优化网络,asp 网站源码,网页目录目录源代码,管理模板lzw
<?php session_start(); // Set some important CAPTCHA constants define(CAPTCHA_NUMCHARS, 6); // number of characters in pass-phrase define(CAPTCHA_WIDTH, 100); // width of image define(CAPTCHA_HEIGHT, 25); // height of image// Generate the random pass-phrase$pass_phrase = ""; for ($i = 0; $i < CAPTCHA_NUMCHARS; $i++) { $pass_phrase .= chr(rand(97, 122)); } // Store the encrypted pass-phrase in a session variable$_SESSION[pass_phrase] = SHA($pass_phrase); // Create the image$img = imagecreatetruecolor(CAPTCHA_WIDTH, CAPTCHA_HEIGHT); // Set a white background with black text and gray graphics$bg_color = imagecolorallocate($img, 255, 255, 255);// white$text_color = imagecolorallocate($img, 0, 0, 0); // black$graphic_color = imagecolorallocate($img, 64, 64, 64); // dark gray// Fill the background imagefilledrectangle($img, 0, 0, CAPTCHA_WIDTH, CAPTCHA_HEIGHT, $bg_color); // Draw some random linesfor ($i = 0; $i < 5; $i++) { imageline($img, 0, rand() % CAPTCHA_HEIGHT, CAPTCHA_WIDTH, rand() % CAPTCHA_HEIGHT, $graphic_color); } // Sprinkle in some random dotsfor ($i = 0; $i
在页面中使用这个生成验证码的脚本
opengl源码,离线语音合成ubuntu,去掉tomcat端口号,爬虫python 入门,e滁州php招聘,马鞍山市seo推广公司lzw
Thanks for adding your new high score! It will be reviewed and added to the high score list as soon as possible. .net在线考试源码,小牛课堂ubuntu教程,tomcat怎么连记事本,58同城爬虫协议,php博客视频教程外包,天津推广seolzw ; echo Name: . $name . ; echoScore: . $score . ; echo ; echo << Back to high scores ; // Clear the score data to clear the form$name = ""; $score = ""; $screenshot = ""; mysqli_close($dbc); } else { echo Sorry, there was a problem uploading your screen shot image. ; }} } else {echo The screen shot must be a GIF, JPEG, or PNG image file no greater than . (GW_MAXFILESIZE / 1024) . KB in size. ; } // Try to delete the temporary screen shot image file @unlink($_FILES[screenshot][ mp_name]);}else { echo Please enter all of the information to add your high score. ;} } else {echo Please enter the verification pass-phrase exactly as shown. ; } }?><formenctype="multipart/form-data"method="post"action=""><inputtype="hidden"name="MAX_FILE_SIZE"value="" />Name:<inputtype="text"id="name"name="name"value="" /> Score:<inputtype="text"id="score"name="score"value="" /> Screen shot: Verification:
‘).addClass(‘pre-numbering’).hide();
$(this).addClass(‘has-numbering’).parent().append($numbering);
for (i = 1; i <= lines; i++) { $numbering.append($(\).text(i)); }; $numbering.fadeIn(1700);}); });
以上就介绍了PHP绘图函数生成图片验证码,包括了方面的内容,希望对PHP教学有兴趣的朋友有所帮助。