php生成短网址 仿微博短网址生成代码
Release: 2016-07-25 08:54:47
Original
898 people have browsed it
-
-
-
-
- urlShort-php生成短网址_bbs.it-home.org_脚本学堂提供
-
-
-
-
-
-
复制代码2,生成php短网址的代码。
- header("Content-Type:text/html;charset=UTF-8");
- function base62($x){
- $show = '';
- while($x>0){
- $s = $x % 62;
- if ($s > 35){
- $s = chr($s + 61);
- }else if ($s > 5 && $S $s = chr($s + 55);
- }
- $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'])."");
复制代码 |
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact
[email protected]
Latest Articles by Author
-
2024-06-05 22:59:48
-
2024-06-05 22:58:44
-
2024-06-05 22:56:59
-
2024-06-05 22:55:46
-
2024-06-05 22:55:29
-
2024-06-05 22:54:57
-
2024-06-05 22:54:44
-
2024-06-05 22:53:05
-
2024-06-05 22:52:06
-
2024-06-05 22:52:00