WEB开发网:show.pl #!/usr/bin/Perl print"Content-type:text/html\n\n"; print"<html>\n"; print"<head>
赞助商链接
中资源
>> 最新文章
>> 赞助商
>> 热门文章
WEB开发网文章阅读

获取随机的密码

作者:未知 文章来源:WEB开发网 更新时间:2007-11-10 10:30:37
show.pl
#!/usr/bin/Perl
print "Content-type: text/html\n\n";
print "<html>\n";
print "<head><meta http-equiv=Content-Type content=text/html;charset=gb2312>\n";
print "<head>\n<body bgcolor=#c0c0c0>\n";
print "<p> </p>";
print "<p align=center><font color=#8080FF><big><strong>送您一百个随机密码, 虽然不好记, 但是都是随机产生的, 很安全!</strong></big></font></p>\n";
print "<div align=center><center>";
print "<table border=1 bgcolor=#C0C0C0 cellspacing=1 cellpadding=3>\n";
for($i=0;$i<10;$i++)
{
print "<tr>"; 
for($j=0;$j<10;$j++)
{
print "<td>"; 
print &getstring;
print "</td>";
}
print "</tr>\n"; 
}
print "</table></center></div>\n";
print "<p></p>";
print "<p><center><a href=show.pl><span style=\"FONT-FAMILY: 宋体; FONT-SIZE: 10pt\">再算一遍</span></a></center></p>";
print "\n</body></html>\n";
exit;
sub getstring
{
$str="";
for($k=0;$k<8;$k++)
{
$num=int(rand(3));
if($num==0) { $str.=pack("c",rand(10)+48); }
elsif($num==1) { $str.=pack("c",rand(26)+65); }
elsif($num==2) { $str.=pack("c",rand(26)+97); }
}
return $str;
}
百度搜索中共有相关主题
[阅读:次] [返回上一页] [打 印]
  • 相关文章
  • 本类热门