首页 > 后端开发 > php教程 > php MD5加密代码:

php MD5加密代码:

WBOY
发布: 2016-08-08 09:29:56
原创
1298 人浏览过

<code><span><span>body</span><span>style</span>=<span>"color:green;font-size:28px;background:black;font-family:Verdana, sans-serif;"</span>></span><span><span><?php </span> error_reporting(<span>0</span>);<span>?></span></span><span>form</span><span>name</span>=<span>"c"</span><span>action</span>=<span>"<?php echo $_SERVER['PHP_SELF'];?>"</span><span>method</span>=<span>"get"</span>></span>
Input your text:
<span>input</span><span>type</span>=<span>"text"</span><span>name</span>=<span>"c"</span> /><span>button</span><span>type</span>=<span>"submit"</span><span>value</span>=<span>"Submit"</span><span>style</span>=<span>"color:green;font-size:28px;background:black;"</span>>Creat!<span><span>button</span>></span><span><span>form</span>></span><span><span>body</span>></span><span><span><?php </span><span>//hash encode:</span><span>if</span>(<span>$c</span>=<span>$_GET</span>[<span>'c'</span>])<span>echo</span><span>'Roger!Your MD5 code is:<br>'</span>.md5(<span>$c</span>).<span>'(32bit)<br>'</span>.substr(md5(<span>$c</span>),<span>8</span>,<span>16</span>).<span>'(16bit)'</span>;<span>//截取8到24就是16位的hash,便于储存</span><span>?></span></span></span></code>
登录后复制

以上就介绍了php MD5加密代码:,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板