Posted by Vince Morgan on 04/20/07 17:48
"Henk Oegema" <henk@oegema.com> wrote in message
news:vIGVh.128805$z84.945241@phobos.telenet-ops.be...
> File /srv/www/htdocs/sms/sms.php (SuSE10.2):
> =================================
>
> <?php
>
> function encryptString($string)
> {
> for ($i=0;$i<strlen($string);$i++)
> {
> $chr = $string{$i};
> if ($chr == "0")
> {
> $chr = "5";
> $string{$i} = $chr;
> }
> elseif ($chr == "1")
> {
> $chr = "6";
> $string{$i} = $chr;
> }
> elseif ($chr == "2")
> {
> $chr = "7";
> $string{$i} = $chr;
> }
> elseif ($chr == "3")
> {
> $chr = "8";
> $string{$i} = $chr;
> }
> elseif ($chr == "4")
> {
> $chr = "9";
> $string{$i} = $chr;
> }
> elseif ($chr == "5")
> {
> $chr = "0";
> $string{$i} = $chr;
> }
> elseif ($chr == "6")
> {
> $chr = "1";
> $string{$i} = $chr;
> }
> elseif ($chr == "7")
> {
> $chr = "2";
> $string{$i} = $chr;
> }
> elseif ($chr == "8")
> {
> $chr = "3";
> $string{$i} = $chr;
> }
> elseif ($chr == "9")
> {
> $chr = "4";
> $string{$i} = $chr;
> }
> }
> return str_rot13($string);
> }
>
I see a bit of a problem here too Henk. str_rot13() shifts only
alphanumeric characters. Which would mean it will do nothing to the members
of your array.
If the forum you mentioned wasn't in Dutch I'd go and have a look, but my
Dutch is 2 * Dutch.
Vince
[Back to original message]
|