Thursday 8 August 2013

How can I convert a query string into a a shorter alphanumeric string (and convert it back again) in PHP?

How can I convert a query string into a a shorter alphanumeric string (and
convert it back again) in PHP?

I want to store the query string of the current URL as a shorter
alphanumeric string with the ability to convert it back to the original
query string.
For example:
inputType=timeline&count=50&hashtag=%23li&filterspecifiedhashtag=1&filterhashtagsend=1&filterscreennames=1&extracturl=1&deshortifyurl=1&filterurls=1
I want to be able to use the resultant alphanumeric string as a filename.
I want to avoid using MYSQL or storing values in a text file.
Is there a way to convert to an alphanumeric string as well as being able
to convert it back to the original query string? I am not very
knowledgeable about hashing but wondering whether some kind of "two way
hashing" technique could work?

No comments:

Post a Comment