This article has been dead for over three months
You
<?php
function text_encode($input) {
$arr=str_split($input,1);
$result='';
foreach($arr AS $val) {
$b=floor(ord($val)/4);
$a=$b+$b+32+($val%4);
$b+=64-(ord($val)%4);
$c=64+(ord($val)%4);
$result.=chr($a).chr($b).chr($c);
}
return $result;
}
function text_decode($input) {
$arr=str_split($input,3);
$result='';
foreach ($arr AS $group) {
$sub=str_split($group,1);
$c=ord($sub[2]);
$c-=64;
$b=ord($sub[1]);
$b-=(64-$c);
//echo $b;
$chr=$b*4;
$chr+=$c;
$result.=chr($chr);
}
return $result;
}
$text=text_encode('Testing...');
echo text_decode($text);
?>