A very basic PHP code, for leet users, that will convert your string into leet characters.
[php]
<?php
/**
* PHP code to convert your string to leet characters.
*/
$input = strtolower($argv[1]);
$output = "";
$count = strlen($input);
for ($i=0;$i<$count;$i++) {
switch ($input[$i]) {
case "a" : $output .= "4";
break;
case "b" : $output .= "8";
break;
case "c" : $output .= "(";
break;
case "d" : $output .= "|)";
break;
case "e" : $output .= "3";
break;
case "f" : $output .= "|\"";
break;
case "g" : $output .= "6";
break;
case "h" : $output .= "|-|";
break;
case "i" : $output .= "1";
break;
case "j" : $output .= "_/";
break;
case "k" : $output .= "|<";
break;
case "l" : $output .= "|_";
break;
case "m" : $output .= "|\\/|";
break;
case "n" : $output .= "|\\|";
break;
case "o" : $output .= "0";
break;
case "p" : $output .= "|*";
break;
case "q" : $output .= "0_";
break;
case "r" : $output .= "12";
break;
case "s" : $output .= "5";
break;
case "t" : $output .= "7";
break;
case "u" : $output .= "|_|";
break;
case "v" : $output .= "\\/";
break;
case "w" : $output .= "\\/\\/";
break;
case "x" : $output .= "><";
break;
case "y" : $output .= "`/";
break;
case "z" : $output .= ">_";
break;
case " " : $output .= " ";
break;
default : $output .= $input[$i];
break;
}
}
echo $output;
?>
[/php]
[php]
<?php
/**
* PHP code to convert your string to leet characters.
*/
$input = strtolower($argv[1]);
$output = "";
$count = strlen($input);
for ($i=0;$i<$count;$i++) {
switch ($input[$i]) {
case "a" : $output .= "4";
break;
case "b" : $output .= "8";
break;
case "c" : $output .= "(";
break;
case "d" : $output .= "|)";
break;
case "e" : $output .= "3";
break;
case "f" : $output .= "|\"";
break;
case "g" : $output .= "6";
break;
case "h" : $output .= "|-|";
break;
case "i" : $output .= "1";
break;
case "j" : $output .= "_/";
break;
case "k" : $output .= "|<";
break;
case "l" : $output .= "|_";
break;
case "m" : $output .= "|\\/|";
break;
case "n" : $output .= "|\\|";
break;
case "o" : $output .= "0";
break;
case "p" : $output .= "|*";
break;
case "q" : $output .= "0_";
break;
case "r" : $output .= "12";
break;
case "s" : $output .= "5";
break;
case "t" : $output .= "7";
break;
case "u" : $output .= "|_|";
break;
case "v" : $output .= "\\/";
break;
case "w" : $output .= "\\/\\/";
break;
case "x" : $output .= "><";
break;
case "y" : $output .= "`/";
break;
case "z" : $output .= ">_";
break;
case " " : $output .= " ";
break;
default : $output .= $input[$i];
break;
}
}
echo $output;
?>
[/php]
No comments:
Post a Comment