it seems to me that the problem with your encryp' function has to do with your 'separators'. Try replacing every ocurrence of your especial chars ( in this case the values $sep could get ) before using your "encrypting" function.
hope i got it right, andy "Thomas "omega" Henning" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello all, > > I encrypt a text lets say omega home with an home made encryption algorithm. > Lets say i encrypt omega home. It will result oomoeogoao ohooomoeo. When i > decrypt it it ses omega hme > Home isn't typed out due 2 exlopde("o","oomoeogoao ohooomoeo"); In this > case. H > My quiestion how i make the PHP code put the first char in this case o in > its right place? > > Thomas "omega" Henning > > ok this is my code > elseif($cmd=="@") > > { > > $sep=substr($enc,0,1); > > $denc=explode($sep,$enc); > > for($i=0;$i<strlen($enc);$i++) > > { > > if() > > $dencf=$dencf.$denc[$i]; > > } > > $dencf=substr($enc,0,1).$dencf; > > irc_put_message("PRIVMSG $nickto :<$nick,encrypted message> $enc:$dencf"); > > } > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]