PHP Basic encryption/decryption for URL parameters -
i'm creating standard 'framework' in php own projects. on point want have url parameters encrypted. variables not contain data need hide anyone. there restrictions.
- no security involved @ all
- decryption
- basic characters (a-z,a-z,0-9)
- optionally salt
- optionally limit length
i've searched internet, contained characters did not prefer due htaccess standards. people asked same question point @ security leaving no suitable answer in case. has encountered this, , has solution think must basic? many in advance.
i think not understands want ( including me ). want make "strange cool url" ?
replace string want.
$string ="ace"; $letters =array( "a"=>'1',"b"=>'2',"c"=>'3',"d"=>'4',"e"=>'5');#etc. $numbers = strtr($string, $letters); ## outputs : 135
edit : think figured out want.
making tiny url youtube does.
take here : http://kevin.vanzonneveld.net/techblog/article/create_short_ids_with_php_like_youtube_or_tinyurl/
Comments
Post a Comment