Forum Moderators: open

Message Too Old, No Replies

Javascript Decoding With Php Encryption

Javascript Decoding With Php Encryption

         

BlackRaven

11:18 pm on May 4, 2006 (gmt 0)

10+ Year Member



I got a nasty spamming bot on one of my sites, wondering if there was an easy way i could encrypt the my users email in php and then decrypt it in javascript.

siMKin

10:03 am on May 5, 2006 (gmt 0)

10+ Year Member



I'm using this one:
[kibbutz.excudo.net...]
(just take a look in the source)

The email string is created like this:

<?php create_email_string($row['email']);?>
<?php
function create_email_string($var)
{
$length = strlen($var);
$string = "";
for ($x = 1; $x <= $length; $x++)
{
$char = substr($var, -$x, 1);
$string .= "sTmp='".$char."'+ sTmp; ";
}
return $string;
}
?>

works for me