Jump to content

Base64 URLs


Leppy

Recommended Posts

Hello,

 

I use the following code to encode my URLs on my site:

 

urlencode(base64_encode("blah blah blah"));

 

Which results in someting like this:

 

YmxhaCBibGFoIGJsYWg

 

And then I put a link on my site using this code

 

<a href="/script/YmxhaCBibGFoIGJsYWg/">Click me</a>

 

It works fine. Although to make a long story short, I added, inside the script who handles the URL, a debug function to let me know if the code "YmxhaCBibGFoIGJsYWg" exist in the DB or not. If it doesn't it sends me an e-mail with the user's browser and requested URL.

 

I've been getting emails lately and I'm clueless about what might be the problem. It is mostly the following User Agent:

 

Java/1.6.0

 

and sometimes:

 

Microsoft URL Control - 6.00.8862

 

The requested URL by both browsers is:

 

/script/ymxhacbibgfoigjsywg/

 

 

It looks like they are not taking the capital letters in the URL. It is a bug in the browser or it is a bug in my script/URL ?

 

If it is a bug in the browser, is there a way I could use only non-capitalized letters with base64 or an alternative of base64?

 

Any would be appreciated!

 

Thank you,

 

Leppy-

Link to comment
https://forums.phpfreaks.com/topic/81046-base64-urls/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.