I would like to encrypt or encode a string so that it can be placed in a URL query string. I'm currently using the encryption class by ircmaxwell, found here. I'm encrypting with:
$urlstring = base64_encode($crypt->encrypt($string, $pword));
That works flawlessly, but the problem is that this encryption uses chars that cause new lines and other weirdness to appear in the url, meaning that it fails (sometimes) to be clickable. Is there a way to take the result, the encrypted string, and wrap it in some function that would be only be A-Za-z and numbers?
Or maybe there's another, better solution?