输入banner图图片脚本导航/分类

生成短网址

<无详细内容>
  1. function base62($x)
  2. {
  3. $show = '';
  4. while($x > 0) {
  5. $s = $x % 62;
  6. if ($s > 35) {
  7. $s = chr($s+61);
  8. } elseif ($s > 9 && $s <=35) {
  9. $s = chr($s + 55);
  10. }
  11. $show .= $s;
  12. $x = floor($x/62);
  13. }
  14. return $show;
  15. }
  16. function urlShort($url)
  17. {
  18. $url = crc32($url);
  19. $result = sprintf("%u", $url);
  20. return base62($result);
  21. }
  22. echo urlShort("http://code.google.com/p/rfphp4zf");