php encrypting an integer to get only alphanumeric characters?

Posted by Matthew Steiner on Stack Overflow See other posts from Stack Overflow or by Matthew Steiner
Published on 2010-05-30T02:26:10Z Indexed on 2010/05/30 2:32 UTC
Read the original article Hit count: 389

Filed under:
|
|
|

When I use some of php's encryption functions, I end up getting a few characters I don't want (+, /, =). The problem is that my application doesn't allow these in the url. I'm wondering if there's a good way of encrypting an integer and having only alphanumeric characters in the result? I'm trying to pass some data through the url. I know it's possible to do some workarounds (put data in database and pass the id to the row or something), but I really want to try it this way.

Ideas?

© Stack Overflow or respective owner

Related posts about php

Related posts about encryption