生成随机字符串
2008-11-29 10:54
295 查看
<SCRIPT type=text/javascript><!--
google_ad_client = "pub-4490194096475053";
/* 内容页,300x250,第一屏 */
google_ad_slot = "3685991503";
google_ad_width = 300;
google_ad_height = 250;
//-->
</SCRIPT>
<SCRIPT src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type=text/javascript>
</SCRIPT>
<SCRIPT>window.google_render_ad();</SCRIPT>
<IFRAME id=google_ads_frame2 style="LEFT: 0px; POSITION: absolute; TOP: 0px" name=google_ads_frame marginWidth=0 marginHeight=0 src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-4490194096475053&dt=1227927245984&lmt=1226285585&prev_slotnames=1891601125&output=html&slotname=3685991503&correlator=1227927245953&url=http%3A%2F%2Fwww.corange.cn%2Farchives%2F2008%2F09%2F1669.html&eid=30143018&ea=0&ref=http%3A%2F%2Fwww.corange.cn%2Fhtml%2Fcorange__91.html&frm=0&ga_vid=2091876339.1227189135&ga_sid=1227927067&ga_hid=917430264&ga_fc=true&flash=9.0.124.0&u_h=768&u_w=1024&u_ah=738&u_aw=1024&u_cd=32&u_tz=480&u_java=true&dtd=31&w=300&h=250&xpc=L2bMZzir1t&p=http%3A//www.corange.cn" frameBorder=0 width=300 scrolling=no height=250 allowTransparency></IFRAME>function genRandomString($len)
{
$chars = array( "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" );
$charsLen = count($chars) - 1;
shuffle($chars);
$output = "";
for ($i=0; $i<$len; $i++) {
$output .= $chars[mt_rand(0, $charsLen)]; }
return $output;
}
google_ad_client = "pub-4490194096475053";
/* 内容页,300x250,第一屏 */
google_ad_slot = "3685991503";
google_ad_width = 300;
google_ad_height = 250;
//-->
</SCRIPT>
<SCRIPT src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type=text/javascript>
</SCRIPT>
<SCRIPT>window.google_render_ad();</SCRIPT>
<IFRAME id=google_ads_frame2 style="LEFT: 0px; POSITION: absolute; TOP: 0px" name=google_ads_frame marginWidth=0 marginHeight=0 src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-4490194096475053&dt=1227927245984&lmt=1226285585&prev_slotnames=1891601125&output=html&slotname=3685991503&correlator=1227927245953&url=http%3A%2F%2Fwww.corange.cn%2Farchives%2F2008%2F09%2F1669.html&eid=30143018&ea=0&ref=http%3A%2F%2Fwww.corange.cn%2Fhtml%2Fcorange__91.html&frm=0&ga_vid=2091876339.1227189135&ga_sid=1227927067&ga_hid=917430264&ga_fc=true&flash=9.0.124.0&u_h=768&u_w=1024&u_ah=738&u_aw=1024&u_cd=32&u_tz=480&u_java=true&dtd=31&w=300&h=250&xpc=L2bMZzir1t&p=http%3A//www.corange.cn" frameBorder=0 width=300 scrolling=no height=250 allowTransparency></IFRAME>function genRandomString($len)
{
$chars = array( "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" );
$charsLen = count($chars) - 1;
shuffle($chars);
$output = "";
for ($i=0; $i<$len; $i++) {
$output .= $chars[mt_rand(0, $charsLen)]; }
return $output;
}
相关文章推荐
- JQuery生成随机字符串
- JS生成1000个数字加字母的不重复的随机字符串
- Excel生成随机字符串(数字大小写混合)
- 012 随机生成n个字节的字符串?
- 随机生成字符串实现
- java生成随机字符串和随机数
- 【分享】JS生成随机字符串
- Asp 生成随机字符串13位
- 在验证码中生成随机字符串
- 生成随机字符串和验证码的类的PHP实例
- 生成n位随机字符串(转)
- js随机生成字母数字组合的字符串 随机动画数字
- php 随机生成一个字符串
- 生成随机字符串的SQL实现
- c# 生成指定位数的随机字符串
- JAVA生成8位随机字符串,数字+英文字母
- Java生成随机字符串
- 生成大量随机字符串不同实现方式的效率对比
- Java随机生成长度不少于6的指定长度的密码,且这个字符串必须包含大小写字母、数字和特殊字符,四种的任意三种
- js 生成随机字符串