复制代码 代码如下:
urlshort
0){
$s = $x % 62;
if ($s > 35){
$s = chr($s + 61);
}else if ($s > 5 && $s$s = chr($s + 55);
} www.jbxue.com
$show .= $s;
$x = floor($x/62);
}
return $show;
}
//生成短网址
function url_short($url){
$url = crc32($url);
$result = sprintf(%u,$url);
return base62($result);
}
echo (生成短网址为:.url_short($_post['url']).);
http://www.bkjia.com/phpjc/766109.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/766109.htmltecharticle分享一个php短网址的生成代码。 复制代码 代码如下: !doctype html html lang=en head meta charset=utf-8 / titleurlshort/title /head body form action=urlshort.p...
