-
/** -
*What to do if the website is maliciously mirrored -
*Code from https://www.ilxtx.com/mirrored-website.html -
*Last updated on: 20171022 Published on: 20160912 -
*From: zhangge.net -
*/ -
add_action('wp_footer','lxtx_deny_mirrored_websites'); -
function lxtx_deny_mirrored_websites(){ -
$currentDomain = 'www " + " .ilxtx. " + " com'; -
// $currentDomain = '"zhangge." + "net"'; -
echo '<img style= "display:none" src= " " onerror=\'this.onerror=null; var str1= "'.$currentDomain.'" ; str2= "docu" + "ment.loca" + "tion.host" ; str3= eval (str2); if ( str1!=str3 && str3!= "cache.baiducontent.com" && str3!= "webcache.googleusercontent.com" && str3!= "c.360webcache.com" && str3!= "cncc.bingj.com" && str3!= "snapshot.sogoucdn.com" ){ do_action = "loca" + "tion." + "href = loca" + "tion.href" + ".rep" + "lace(docu" + "ment" + ".loca" + "tion.ho" + "st," + "\"' . $currentDomain .'\ "" + ")" ; eval (do_action) }\' />'; -
}