Jump to content

Encode/Convert text to numbers/binary


Andrew R

Recommended Posts

Hi there. 

 

I was wondering if it were possible to convert text to numbers or some sort of URL friendly link. For example, "Hello there" would be converted to '435342553' or whatever.

 

I want to do this because for example when someone goes to this URL, example.com/435343434, the number/uri string would be decoded and whatever the text was it would be displayed on the site.  I can write all this code no bother I just need some advice/ideas on the the encoding/decoding of the text.

 

I was looking at some options for doing this.....

 

hexdec - removes spaces

md5 - cannot be decoded?

 

None of them seem to be working, the problem is decoding them.    md5 creates a perfect uri string but as I said it cannot be decoded.

 

I would appreciate any ideas of suggestions.

 

Thanks a million.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.