|
|
Joined: May 1999
Posts: 3,039
Guru
|
Guru
Joined: May 1999
Posts: 3,039 |
Ok, let's see how many PHP people are watching this forum.
Does anyone know how to URL encode and unencode strings for use in links. For example, if you have a Username with a space in it, in order to link to that profile you need to URL encode the space to the percent20 sign and then on the other end it converts that percent20 sign back to a space. I have a function to do this in PERL, but haven't come across with the way to do this in PHP.
Ideas, solutions, comments?
UBB.threads Developer
|
|
|
|
Joined: Jun 1999
Posts: 77
Journeyman
|
Journeyman
Joined: Jun 1999
Posts: 77 |
rawurlencode() and rawurldecode() will accomplish what you want. You can also use urlencode() and urldecode() to substitute a plus sign instead of PERCENT20.
Usage would be rawurlencode($string) Thank you, Bob
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
Guru
Joined: May 1999
Posts: 3,039 |
Thanks Bob, that works like a charm[]/w3timages/icons/smile.gif[/].
UBB.threads Developer
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 69
Joined: January 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|