php生成短网址
2018-01-22 16:26
330 查看
function SuoUrl($url='') { $urlcode =$this->shorturl($url); } function shorturl($url){ $url=crc32($url); $result=sprintf("%u",$url); $res = $this->code62($result); return $res; } function code62($result){ $show=''; while($x>0){ $s=$x % 62; if ($s>35){ $s=chr($s+61); }elseif($s>9&&$s<=35){ $s=chr($s+55); } $show.=$s; $x=floor($x/62); } return $show; }
相关文章推荐
- 使用PHP生成短网址的方案
- PHP生成短网址的3种方法代码实例
- 一个php短网址的生成代码(仿微博短网址)
- php生成短网址示例代码
- 一个php短网址的生成代码(仿微博短网址)
- php 短网址的生成和还原原理
- 微信公众号转换短链接,短网址,php开发公众号生成短链接
- php生成短网址
- php 生成短网址原理及代码
- 一个PHP生成短网址函数
- php 生成短网址原理及代码
- PHP生成短网址方法汇总
- php生成短网址的思路与方法
- php生成短网址示例
- php生成短网址示例
- php 生成短网址
- 仿微博php生成短网址
- PHP 10进制与62进制互转,可用于生成短网址
- php 生成短网址
- php生成短网址的思路及其实现