Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Characters that shouldn't be in a URL

  • 14-01-2007 12:58PM
    #1
    Registered Users, Registered Users 2 Posts: 4,475 ✭✭✭


    I'm writing a simple encryption routine for my site, and have had some minor problems with it. Basically, I encrypt a string and then send it as a parameter to a URL, test.php?x={encrypted string}

    Where it's failing, it's down to certain characters in this encrypted string, so &, =, # have all caused the resulting page to fail. That's fine, I can simply remove these characters from the encryption routine. But I can't test all possible encrypted strings, so is there a list of characters that might cause issue in a URL like these ones?
    &
    =
    #
    .
    


Comments

  • Closed Accounts Posts: 831 ✭✭✭Laslo


    Haha. I was just thinking about writing a function to do something similar a few minutes ago. If anyone has an array of characters already prepared, do share the wealth. :D


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    Use PHP's urlencode/urldecode function, or an equivalent.


Advertisement