note 29203 added to function.strtr

From: Date: Thu, 06 Feb 2003 00:08:20 +0000
Subject: note 29203 added to function.strtr
Groups: php.notes 
Request: Send a blank email to php-notes+get-43487@lists.php.net to get a copy of this message
strtr is a usefull encoding mechinism instead of using str_rot13. you can impliment it when you write usernames to a file, for example. but know that it is easy to crack your encription. an example: <?php $unencripted = "hello"; $from = "abcdefghijklmnopqrstuvwxyz"; $to = "zyxwvutsrqponmlkjihgfedcba"; $temp = strtr($unencripted, $from, $to); /* will return svool */ ?> -- http://www.php.net/manual/en/function.strtr.php http://master.php.net/manage/user-notes.php?action=edit+29203 http://master.php.net/manage/user-notes.php?action=delete+29203 http://master.php.net/manage/user-notes.php?action=reject+29203

« previous php.notes (#43487) next »