我将不同的值存储到不同的变量,使用base64_encode转换每个值,然后将它们合并在一起并回显它;它工作,但当我解码它,它没有给我回到正常的初始值/原始值。然后我决定在解码和编码之前将所有值存储到一个变量中,但问题仍然相同...请给我你的建议 以下是我的代码:
<?php
$pvars_timestamp;
$pvars_os;
$pvars_ip;
$pvars_place_n;
$pvars_publisher_n;
$pvars_timestamp = "pvars_timestamp=" . rand(1520500000 , 1520599999);
$pvars_os = "&pvars_os=Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36";
$pvars_refer = "&pvars_refer=https://www.naijaflavour.com/";
$ip1 = 197;
$ip2 = 210;
$ip3 = rand(0,255);
$ip4 = rand(0,255);
$pvars_ip = "&pvars_ip=" . $ip1."." . $ip2. "." . $ip3. "." .$ip4;
$pvars_place_n = "&pvars_place_n=". 80;
$pvars_publisher_n = "&pvars_publisher_n=" . 57;
$res1 = base64_encode($pvars_timestamp);
$res2 = base64_encode($pvars_os);
$res3 = base64_encode($pvars_refer);
$res4 = base64_encode($pvars_ip);
$res5 = base64_encode($pvars_place_n);
$res6 = base64_encode($pvars_publisher_n);
$dec = $res1 . $res2 . $res3 . $res4 . $res5 . $res6;
$final = base64_decode($dec);
$dec2 = $pvars_timestamp . $pvars_os . $pvars_refer . $pvars_ip . $pvars_place_n . $pvars_publisher_n;
$final2 = base64_decode($dec2);
echo "<br/>";
echo "<br/>";
echo $dec;
echo "<br/>";
echo "<br/>";
echo $dec2;
echo "<br/>";
echo "<br/>";
echo "<br/>";
echo $final;
echo "<br/>";
echo "<br/>";
echo $final2;
//echo $pvars_timestamp . $pvars_os . $pvars_refer . $pvars_ip . $pvars_place_n . $pvars_publisher_n;
echo "<br/>";
echo "<br/>";
echo $pvars_timestamp;
echo "<br/>";
echo "<br/>";
echo base64_encode($pvars_timestamp);
echo "<br/>";
echo $pvars_os;
echo "<br/>";
echo base64_encode($pvars_os);
echo "<br/>";
echo $pvars_refer;
echo "<br/>";
echo base64_encode($pvars_refer);
echo "<br/>";
echo $pvars_ip;
echo "<br/>";
echo base64_encode($pvars_ip);
echo "<br/>";
echo $pvars_place_n;
echo "<br/>";
echo base64_encode($pvars_place_n);
echo "<br/>";
echo $pvars_publisher_n;
echo "<br/>";
echo base64_encode($pvars_publisher_n);
//echo base64_encode($pvars_timestamp); echo base64_encode($pvars_os); echo base64_encode($pvars_refer); echo base64_encode($pvars_ip); echo base64_encode($pvars_place_n); echo base64_encode($pvars_publisher_n);
?>
<html>
<a href="https://nnu.ng/adsure/click.php?a=33&x=TVRVeU1EVTBNamsyTlMweE9UY3VNakV3TGpJeU5pNHhNdz09&z=27&c=1&adurl=558148&pl=80&plurl=946&pvars=<?php echo base64_encode($pvars_timestamp); echo base64_encode($pvars_os); echo base64_encode($pvars_refer); echo base64_encode($pvars_ip); echo base64_encode($pvars_place_n); echo base64_encode($pvars_publisher_n); ?>">CLICK ME</a>
</html>