"):$retstr=str_replace(">",">", $str);break; case(""):$retstr=str_replace("","©", $str);break; default:$retstr=str_replace($smb,"&#".ord($smb).";",$str);break; } return $retstr; } function smokeSymbol($str,$smb) { switch($smb) { case("."):$retstr=mt_rand(0,1)?str_replace(".","·",$str):str_replace(".","¸",$str);break; case("@"):$retstr=mt_rand(0,1)?str_replace("@","©",$str):str_replace("@","®",$str);break; } return $retstr; } function randomCut($mls) { $parts=range(0,1); $dif=mt_rand(0,strlen($mls)-1)+1; if($dif==strlen($mls)) $dif--; $part0=substr($mls,0,$dif); $part1=substr($mls,$dif,strlen($mls)-$dif+1); return array($part0,$part1); } function generateJSName($minl,$maxl,$letonly) { $tt=chr(mt_rand(0,25)+97); $m=mt_rand($minl,$maxl); for($n=0;$n<$m;$n++) $tt.=($letonly?0:mt_rand(0,1))?chr(mt_rand(0,9)+48):chr(mt_rand(0,25)+97); return $tt; } function encodeJS($email,$name="",$subj="",$linkattr="") { if(!$email) { echo "PHP error"; return; } if(!$name) $name=$email; $vars=range(0,9); for($i=0;$i<10;$i++) $vars[$i]=generateJSName(4,8,0); $result=""; $result.=""; $result.=""; return $result; } function encodeJSP($email,$name="",$subj="",$linkattr="",$referrer="") { if(!$email) { echo "PHP error"; return; } if(!$name) $name=$email; $vars=range(0,9); for($i=0;$i<10;$i++) $vars[$i]=generateJSName(4,8,0); $result.=""; $result.=""; return $result; }; #helps if(!$options) $options=$_GET['beeoptions']; if(strpos($options,'help')===false);else { echo "
";
 echo "ABOUT\n";
 echo "* Encoder for defending  e-mail links from spam-bots\n";
 echo "* by Ennin (ennin[at]mail[dot]ru)\n";
 echo "* based on Blackman's E-mail Encoder algorithms\n";
 echo "*\n";
 echo "* encodeJS is algorithm that just prints parts of email link by using JScript document.write;\n";
 echo "* encodeJSP is paranoia. Based on event processors onClick, onMouseLeave, onMouseOver\n";
 echo "*\n";
 echo "* syntax of using:\n";
 echo "* encodeJS(\$email[,\$name[,\$subject[,\$linkattributes]]]);\n";
 echo "* encodeJSP(\$email[,\$name[,\$subject[,\$linkattributes[,\$false_address]]]]);\n";
 echo "*\n";
 echo "* examples for encodeJS:\n";
 echo "*  encodeJS('user@domain.zone','send a letter to user@domain.zone');\n";
 echo "*  encodeJS('user@domain.zone','send a letter','a letter from testing email encoder','class=maillink');\n";
 echo "* examples for encodeJSP:\n";
 echo "*  encodeJSP('user@domain.zone','send a letter to user@domain.zone'); \n";
 echo "*  encodeJSP('user@domain.zone','send a letter','a letter from testing email encoder','style=text-decoration:none;','spam@microsoft.com');\n";
 echo "* functions return strings with codes. So you must use echo function() or \$var=function();echo \$var;";
 echo "
"; }; if(strpos($options,'example')===false);else { echo "Examples\n"; echo ""; echo "
methodcoderesult"; echo "
JSecho encodeJS('user@domain.zone','send a letter to user@domain.zone');";echo encodeJS('user@domain.zone','send a letter to user@domain.zone'); echo "
JSecho encodeJS('user@domain.zone','send a letter','a letter from testing email encoder','class=maillink');";echo encodeJS('user@domain.zone','send a letter','a letter from testing email encoder','class=maillink'); echo "
JSPecho encodeJSP('user@domain.zone','send a letter to user@domain.zone');";echo encodeJSP('user@domain.zone','send a letter to user@domain.zone'); echo "
JSPecho encodeJSP('user@domain.zone','send a letter','a letter from testing email encoder','style=text-decoration:none;','spam@microsoft.com');";echo encodeJSP('user@domain.zone','send a letter','a letter from testing email encoder','style=text-decoration:none;','spam@microsoft.com'); echo "
"; } #/helps ?>