gpt4 book ai didi

php生成短网址示例

转载 作者:qq735679552 更新时间:2022-09-29 22:32:09 26 4
gpt4 key购买 nike

CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.

这篇CFSDN的博客文章php生成短网址示例由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.

php生成短网址   。

复制代码 代码如下:

<?php  $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","0","1","2","3","4","5",     "6","7","8","9","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"); $salt="www.joneto.com"; $hash=md5("http://www.sina.com".$salt); $rs=array(); for($i=0;$i<4;$i++){  $temp=substr($hash, $i*8,8);  $temp=base_convert($temp, 16, 10) & base_convert("3fffffff", 16, 10),

  。

 $str="";  for($j=0;$j<6;$j++){   $subtemp=$temp & intval(base_convert("3d", 16, 10));   $str.=$chars[$subtemp];   $temp=$temp>>5;  }  unset($temp);  $rs[]=$str; } print_r($rs); ?> 。

  。

最后此篇关于php生成短网址示例的文章就讲到这里了,如果你想了解更多关于php生成短网址示例的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com