Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ///////////////////////////////////////////////////////
- //** Text to Int Encoder
- //** Text to Int Decode Helper
- //** Copyright by Narzew
- //** http://pokepark.tk
- //** 29.11.12
- ///////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////
- //**encode_ints
- //**Encodes string to int (one-way!)
- ///////////////////////////////////////////////////////
- function encode_ints($text){
- $letters = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
- $ints = array('2','2','2','3','3','3','4','4','4','5','5','5','6','6','6','7','7','7','7','8','8','8','9','9','9','9');
- return str_replace($letters, $ints, strtolower($text));
- }
- ///////////////////////////////////////////////////////
- //**decode_ints
- //**Helps decoding ints making possibilities to each int
- ///////////////////////////////////////////////////////
- function decode_ints($text){
- $letters = array('(abc)','(abc)','(abc)','(def)','(def)','(def)','(ghi)','(ghi)','(ghi)','(jkl)','(jkl)','(jkl)','(mno)','(mno)','(mno)','(pqrs)','(pqrs)','(pqrs)','(pqrs)','(tuv)','(tuv)','(tuv)','(wxyz)','(wxyz)','(wxyz)','(wxyz)');
- $ints = array('2','2','2','3','3','3','4','4','4','5','5','5','6','6','6','7','7','7','7','8','8','8','9','9','9','9');
- return str_replace($ints,$letters, $text);
- }
- ///////////////////////////////////////////////////////
- //**End of script
- ///////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////
- //**Copyright by Narzew
- //**http://pokepark.tk
- ///////////////////////////////////////////////////////
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement