Hi all,
I am very new to this forum and to PHP, but I need your help.
I am on a paied host that supports php.
I found a script, but it does not want to work.
Basically the script has a form where the user need to paste the html code, and the script crypt it.
I managed to make the form working, but after pressing the submit button, I get a 404 error.
The form is here:
http://www.diludovico.it/prova.php
The script is this:
code:--------------------------------------------------------------------------------
<?php
if (isset($Crypt)){
$enc_string = "";
$html = str_replace("\r\n", "",$html);
//$html = str_replace("\"", "", $html);
$length = strlen($html);
for ($i=0;$i<$length;$i++)
{
$current_chr = substr($html, $i, 1);
$inter = ord($current_chr)+3;
$enc_string .= chr($inter);
}
echo "Please cut and paste the following code into your HTML editor";
//$enc_string = $enc_string;
$script="<script>
var a, s, n;
function UnCrypt(s) {r='';for(i=0;i<s.length;i++){n=s.charCodeAt(i); if (n>=8364) {n = 128;} r += String.fromCharCode( n - 3 ); }return r;}
a =\"".str_replace('_', '', $enc_string)."\";
document.write (UnCrypt(a));
</script>";
}
else {
echo "Paste your HTML into the box below and click Crypt";
}
?>
<form action="index2.php" method="post">
<input type="hidden" name="id" value="36">
<textarea cols="75" rows="20" name="html"><?php echo $script?></textarea><br>
<input type="submit" name="Crypt" value="Crypt">
</form> --------------------------------------------------------------------------------
Can anyone tell me how to make it work?
Thanks a lot in advance