求一个加密的问题? 明码:abcd123暗码:7683513b29093c0c请问这中间是通过什么加密方式? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?php/*@名称:PHP加密/解密*/function phpencode($code) {$code = str_replace(array('<?php','?>','<?PHP'),array('','',''),$code);$encode = base64_encode(gzdeflate($code));// 开始编码$encode = '<?php'."\neval(gzinflate(base64_decode("."'".$encode."'".")));\n?>";return $encode;}function phpdecode($code) {$code = str_replace(array('<?php','<?PHP',"eval(gzinflate(base64_decode('","')));",'?>'),array('','','','','',''),$code);$decode = base64_decode($code);$decode = @gzinflate($decode);return $decode;}?><!DOCTYPE html><html lang="zh-CN"><meta charset="utf-8"><title>PHP加密/解密</title><link rel="alternate" title=" " href="http://feeds.feedburner.com/feeds/rss"type="application/rss+xml" /><style type="text/css" media="all">html, body {margin: 0;padding: 0; }body {color: #333;font: 12px Tahoma,Lucida Grande, sans-serif;margin: 9%;}a {color: #0055CC; }img {border: 0px solid #CCC;}h1 {margin: 0;}h3 {color:#555;font-size: 1.6em;font-weight: normal;margin: 0; }pre {color: #0055CC;font-size: 1.1em;line-height: 1.2;margin: 0.25em 0; }p {margin: 0.65em 0;}#ads {border-left: 1px solid #eee;float:right;margin: 0 0 2em 2.5em;padding-left: 3px;width: 160px;}#source {margin-bottom: 2.5em; }pre{overflow: auto;padding:1em 0; }h2 {position: relative;top: 0.5em;}</style><h3>PHP加密/解密</h3><form method="post"><textarea name="source" cols="55" rows="8"><?phpif(!empty($_POST['source'])) {if($_POST['button']=='加密') {echo htmlspecialchars(phpencode(stripcslashes($_POST['source'])));}if($_POST['button']=='解密') {echo htmlspecialchars(phpdecode(stripcslashes($_POST['source'])));}}?></textarea><?phpif(!empty($_POST['source'])){if($_POST['button']=='加密') {echo '<br /><br />加密成功.';}if($_POST['button']=='解密') {echo '<br /><br />解密成功.';}}else{echo '<br /><br />利用 base64+gzinflate 对您的PHP代码进行压缩,可以一定程度上保护您的代码版权和减小代码的体积。';}?><br /><br /><input type="submit" name="button" value="加密"><input type="submit" name="button" value="解密"></form> 求助,关于linux下配置zend debugger的一个问题 mysq gbk写入,utf-8提取 checkbox隐藏和显示 全局变量的问题 大家搞技术常去哪些网站? 再问一个POSIX语法的正则式 php ADO access数据库 update语句无法引用主键的值 PHP帝国论坛升级为EBB2.0了。。。。 恶意解析的问题 有几个未知数组,不知道他们是否存在(NULL),如果存在就合并数组,怎么写? 请问PHP怎么限制论坛帖子内小于3个链接 PHP 如何实现将一个文本框里面的SQL执行结果的字段取到?
<?php
/*
@名称:PHP加密/解密
*/
function phpencode($code) {
$code = str_replace(array('<?php','?>','<?PHP'),array('','',''),$code);
$encode = base64_encode(gzdeflate($code));// 开始编码
$encode = '<?php'."\neval(gzinflate(base64_decode("."'".$encode."'".")));\n?>";
return $encode;
}
function phpdecode($code) {
$code = str_replace(array('<?php','<?PHP',"eval(gzinflate(base64_decode('","')));",'?>'),array('','','','','',''),$code);
$decode = base64_decode($code);
$decode = @gzinflate($decode);
return $decode;
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<meta charset="utf-8">
<title>PHP加密/解密</title>
<link rel="alternate" title=" " href="http://feeds.feedburner.com/feeds/rss"type="application/rss+xml" />
<style type="text/css" media="all">
html, body {margin: 0;padding: 0; }body {color: #333;font: 12px Tahoma,Lucida Grande, sans-serif;margin: 9%;}a {color: #0055CC; }img {border: 0px solid #CCC;}h1 {margin: 0;}h3 {color:#555;font-size: 1.6em;font-weight: normal;margin: 0; }pre {color: #0055CC;font-size: 1.1em;line-height: 1.2;margin: 0.25em 0; }p {margin: 0.65em 0;}#ads {border-left: 1px solid #eee;float:right;margin: 0 0 2em 2.5em;padding-left: 3px;width: 160px;}#source {margin-bottom: 2.5em; }pre{overflow: auto;padding:1em 0; }h2 {position: relative;top: 0.5em;}
</style>
<h3>PHP加密/解密</h3>
<form method="post">
<textarea name="source" cols="55" rows="8">
<?php
if(!empty($_POST['source'])) {
if($_POST['button']=='加密') {
echo htmlspecialchars(phpencode(stripcslashes($_POST['source'])));
}
if($_POST['button']=='解密') {
echo htmlspecialchars(phpdecode(stripcslashes($_POST['source'])));
}
}
?>
</textarea>
<?php
if(!empty($_POST['source'])){
if($_POST['button']=='加密') {
echo '<br /><br />加密成功.';
}
if($_POST['button']=='解密') {
echo '<br /><br />解密成功.';
}
}else{
echo '<br /><br />利用 base64+gzinflate 对您的PHP代码进行压缩,可以一定程度上保护您的代码版权和减小代码的体积。';
}
?>
<br /><br />
<input type="submit" name="button" value="加密">
<input type="submit" name="button" value="解密">
</form>