亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 3700 | 回復(fù): 7
打印 上一主題 下一主題

求php 驗(yàn)證碼程序 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2006-04-29 12:40 |只看該作者 |倒序?yàn)g覽
誰有做過php 驗(yàn)證碼程序?要復(fù)雜一點(diǎn)的,難識別一點(diǎn)的,有沒有給共享下的?謝謝!

[ 本帖最后由 xhy701 于 2006-4-29 12:51 編輯 ]

論壇徽章:
0
2 [報告]
發(fā)表于 2006-04-29 12:45 |只看該作者
暈..驗(yàn)證還破解..
PHP_Linux 該用戶已被刪除
3 [報告]
發(fā)表于 2006-04-29 19:39 |只看該作者
提示: 作者被禁止或刪除 內(nèi)容自動屏蔽

論壇徽章:
0
4 [報告]
發(fā)表于 2006-04-30 02:38 |只看該作者
GD畫成圖,SESSION保存一下就OK了.
操作起來還快.
沒有必要保存到數(shù)據(jù)庫

論壇徽章:
0
5 [報告]
發(fā)表于 2006-04-30 02:40 |只看該作者
識別難就是你把圖做的讓程序很難識別就OK了.

論壇徽章:
0
6 [報告]
發(fā)表于 2006-04-30 07:40 |只看該作者

回復(fù) 1樓 xhy701 的帖子

論壇徽章:
0
7 [報告]
發(fā)表于 2006-04-30 09:24 |只看該作者
原帖由 xhy701 于 2006-4-29 12:40 發(fā)表
誰有做過php 驗(yàn)證碼程序?要復(fù)雜一點(diǎn)的,難識別一點(diǎn)的,有沒有給共享下的?謝謝!

我做的你可以看看效果
http://pwc.casc.com.cn

代碼:

登錄界面
index.html
###########################################################

<html>
<head>
<title>login</title>
<style type="text/css">
<!--
.textbox {
height: 18px;
width: 100px;
}
.text {
font-size: 14px;
vertical-align: bottom;
color: #0000FF;
}
.style1 {
font-size: 18px;
color: #0000FF;
font-family: "幼圓";
}
-->
</style>
</head>
<body>
<table width="200">
<tr><td align="center" valign="bottom" class="style1" bgcolor="#C7D3F9">請輸入用戶名和密碼</td>
</tr>
</table>
<form method="post" action="login.php">
<table width="200" border="0" bgcolor="C7D3F9">
  <tr>
    <td width="97" class="text">用戶名:</td>
    <td width="144" align="right" valign="bottom"><input type="text" name="user" class="textbox"></td>
  </tr>
  <tr>
    <td class="text">密碼:</td>
    <td align="right" valign="bottom"><input type="password" name="passwd" class="textbox"></td>
  </tr>
  <tr>
    <td class="text">驗(yàn)證碼:</td>
    <td align="right" valign="bottom"><input type="text" name="auth" class="textbox"></td>
  </tr>
</table>
<img src="ttt.php?act=yes" align="middle">
<table width="200"><tr><td align="right"><input type="button" value="看不清楚驗(yàn)證碼" onclick="window.location.reload();"><input name="submit" type="submit" value="Submit"></td></tr></table>
</form>
</body>
</html>


生成驗(yàn)證碼程序
ttt.php
###########################################################
<?
if($_GET['act'] == "yes"
{
header('Content-type: image/gif');
$im = imagecreate(60,1;
//$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
$chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
$str_a = $chars{mt_rand(0,35)}; //區(qū)分大小寫的值為mt_rand(0,61)
$str_b = $chars{mt_rand(0,35)};
$str_c = $chars{mt_rand(0,35)};
$str_d = $chars{mt_rand(0,35)};
$string = $str_a.$str_b.$str_c.$str_d;
$bg = imagecolorallocate($im, 250, 250, 159);
$font_color = imagecolorallocate($im, mt_rand(0,150),mt_rand(0,150),mt_rand(0,150));
imagestring($im, mt_rand(3,5), mt_rand(0,5), mt_rand(0,5), $str_a, $font_color);
imagestring($im, mt_rand(3,5), mt_rand(15,25), mt_rand(0,5), $str_b, $font_color);
imagestring($im, mt_rand(3,5), mt_rand(30,40), mt_rand(0,5), $str_c, $font_color);
imagestring($im, mt_rand(3,5), mt_rand(45,50), mt_rand(0,5), $str_d, $font_color);
for ($i=1; $i<=15; $i++)
{
        imagestring($im,mt_rand(0,5),mt_rand(-5,63),mt_rand(-5,23),".",imageColorAllocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255)));
}
imagegif($im);
session_start();
$_SESSION['auth'] = $string;
}
?>


驗(yàn)證程序
login.php
###########################################################
<?php
session_start();
$name = $_POST['user'];
$password = $_POST['passwd'];
$auth = $_POST['auth'];
require("db.php";
$db = new db();
$sql = "select * from user where name = '$name' and password = '$password'";
$result = $db->query($sql);
if($data = mysql_fetch_object($result) > 0 and $_SESSION['auth'] == $auth)
{
  $_SESSION['user'] = $name;
  $_SESSION['passwd'] = $password;
  header("Location: main.php";
}else
{
  print '
  <script language=javascript>
   alert("登錄失敗,請重新登錄!";
   self.window.location="index.html";
  </script>';
}
?>

論壇徽章:
1
技術(shù)圖書徽章
日期:2013-12-05 23:25:45
8 [報告]
發(fā)表于 2006-05-01 20:42 |只看該作者
要不請求這樣子的字符:



然后用session保存,要求輸入,看看好破么?
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP