and I want to put it in a form to make a rot13 translator to text/text to rot13. I have read everything, and been at this for days but cant seem to get it :cry: Can someone please give me a small working example of how this would be used in a form to help get me going in the right direction? Thanks in advance

rot13 is a very simple method of quickly "encrypting" some text.
to get the original text back simply apply the method again, and you get it back.
it work by swapping the first 13 letters with the last 13 letters of the alphabet.

To answer Jahmin's question:
Make a normal html-form with an input field.
You can then make the resulting page with the posted information.
use the function like this:

DoppyNL wrote:rot13 is a very simple method of quickly "encrypting" some text.to get the original text back simply apply the method again, and you get it back.it work by swapping the first 13 letters with the last 13 letters of the alphabet.

by the way.. when you use rot13, can it be read by thephp server?
so is this a way to prevent people from reading your code?

the web-server will only understand normal code, applying rot13 to it will prevent the webserver from parsing the code.

Also, I said "encrypting" (with quotes) because it is not really encrypting. When I see text wich was altered by rot13 I immediatly recognise it.
It is also very easy to get the original contents, so you should absolutely not rely on this method to keep data safe.

DoppyNL wrote:the web-server will only understand normal code, applying rot13 to it will prevent the webserver from parsing the code.

Also, I said "encrypting" (with quotes) because it is not really encrypting. When I see text wich was altered by rot13 I immediatly recognise it.It is also very easy to get the original contents, so you should absolutely not rely on this method to keep data safe.

Greetz Daan

Thanks for the reply :lol:
Is there a method in php that would protect your data (for example, to keep track of passwords, credit cards..etc..) :

PHP does have ways of encrypting things, but that's best left up to the server hardware to prevent these sorts of attacks. If you also want to encrypt data one way (ie so you can check passwords) the best way is md5, it's a one way industry standard encryption algorithm which is impossible to break!