Revision: 22518
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 14, 2010 04:43 by Helbom
Initial Code
function scramble($text)
{
$length = strlen($text);
$output = '';
for ($i = 0; $i < $length; $i++)
{
$output .= "&#" . ord(substr($text,$i,1)) . ";";
}
return $output;
}
Initial URL
Initial Description
This function does not scramble the output text. But it obfuscates the text in the source code. A very useful function to "hide" emails and other things that you dont want robots to find..
Usage:
echo scramble("scramble me");
Result:
- Front: scramble me
- Source: scramble me
Initial Title
Obfuscate text source
Initial Tags
Initial Language
PHP