<?php
function xorEncoding($string,$key){
$encoding="";
for($i=0;$i<strlen($string);$i++){
$encoding=$encoding.($string[$i]^$key);
}
return base64_encode($encoding);
}
$s=$_GET['s'];
$k="H";
$estr=xorEncoding($s,$k); //加密
if($estr==$_GET['x']){
echo "1";
}else
{
echo "0";
}
?>
function xorEncoding($string,$key){
$encoding="";
for($i=0;$i<strlen($string);$i++){
$encoding=$encoding.($string[$i]^$key);
}
return base64_encode($encoding);
}
$s=$_GET['s'];
$k="H";
$estr=xorEncoding($s,$k); //加密
if($estr==$_GET['x']){
echo "1";
}else
{
echo "0";
}
?>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货