How to use simple character encoding

Discussion in 'PHP' started by guruguy, Dec 28, 2008.

  1. #1
    Here is my problem -

    I have a script that takes the input and runs various commands through the exec() function. It processes files that were saved to disk earlier in the script. Each file is a png of a single letter or character, so that with a character like an asterix, backslash or space, this creates havoc through the executed command.

    What is the best way to encode the characters? I need to give each character entered a unique identifier that is just letters and / or numbers. It does not need to be reversed, however if I encode the same character again there will be the same result. Is there such an encoding function in php?

    Thanks,
    Guruguy
     
    guruguy, Dec 28, 2008 IP