PHP搭配JS进行加密跳转

<?php 
// Javascript/HTML hex encode 
function encode($input) 
{ 
    $temp = ''; 
    $length = strlen($input); 
    for($i = 0; $i < $length; $i++) 
        $temp .= '%' . bin2hex($input[$i]); 
    return $temp; 
} 
$str = encode("<script type=\"text/javascript\">window.location.href='https://www.76it.com/';</script>"); 
$replace = str_replace("%"," ",$str);
echo '<script>function QccdsXAoJuGaADBXiUhi(ahKRrF){document.write((unescape(ahKRrF)));};QccdsXAoJuGaADBXiUhi("'.$replace.'".replace(/ /g, "%"));</script>';
?>



© 版权声明
THE END