从品牌网站建设到网络营销策划,从策略到执行的一站式服务
今天就跟大家聊聊有关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中如何生成短网址有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注创新互联行业资讯频道,感谢大家的支持。
成都网站建设公司地址:成都市青羊区太升南路288号锦天国际A座10层 建设咨询028-86922220
成都快上网科技有限公司-四川网站建设设计公司 | 蜀ICP备19037934号 Copyright 2020,ALL Rights Reserved cdkjz.cn | 成都网站建设 | © Copyright 2020版权所有.
专家团队为您提供成都网站建设,成都网站设计,成都品牌网站设计,成都营销型网站制作等服务,成都建网站就找快上网! | 成都网站建设哪家好? | 网站建设地图