Sa-i zicem un fel de protectie anti copiere.
Nu am de gand sa-l folosesc, dar cineva a intrebat la un moment dat cum se poate proteja de cURL
Alte idei ?
Cod: Selectaţi tot
<html>
<head>
<title>Cript</title>
<script type="text/javascript">
function change_char(val, input){
output = "";
for(i=0; i<input.length; ++i){
if(output != "") {output += ", ";}
output += input.charCodeAt(i) + val;
}
outputstring = eval("String.fromCharCode(" + output + ")");
return outputstring;
}
function decript(tagid){
val = 1; //poate fi generat random de php
input = document.getElementById(tagid).innerHTML;
output= change_char(val, input);
document.getElementById(tagid).innerHTML = output;
}
</script>
</head>
<body onload="decript('showinputs');">
<!-- GENERAT aiurea de PHP in loc de A este B, in loc de C este D... Pasul poate fi setat in PHP aleator etc -->
<div id = "showinputs">
Rbq`lakdcsdws9Dmfkhrgnqhfhm`sdceqnlsgdetrhnmnek`mft`fdr`mcch`kdbsr+mnvbnkkdbshudkxsdqldcNkcDmfkhrg+vghbgvdqdaqntfgssnsgdd`rsdqmbn`rsneFqd`sAqhs`hmaxFdql`mhb'@mfkn,R`wnm(rdsskdqraxsgd4sgbdmstqxvhsgsgdvnqcDmfkhrgadhmfcdqhudceqnlsgdm`ldnesgd@mfkdr-
</div>
</body>
</html>