Reversible XOR encryption in PHP

It took to make reversible XORencryption with the ability to embed the encrypted string in the URL:

UPD:
The outcome of this script, I did not like, it is better to use something like this