Does anybody know a quick way to convert a string that may included spaces and characters like hash and ampersand into the correct coding for a URL.
A quick forum search turned up nothing.
Obviously I want to do this in game.
If it's not easy, just let me know. I'm trying to put something together for this weekend and I don't know php (which seems like it would be good for what I'm doing but I don't have time to learn it).
Thanks in advance for any help.
URL coding
Started by TeamSteeve, Jul 05 2012 07:11 AM
3 replies to this topic
#1
Posted 05 July 2012 - 07:11 AM
#2
Posted 08 July 2012 - 06:39 PM
http://en.wikipedia....ercent-encoding
Only way I can think of is to go through each item in the "Percent-encoding reserved characters" and "Character data" sections in the article above, and for each of these, call a string_replace_all to do that.
Only way I can think of is to go through each item in the "Percent-encoding reserved characters" and "Character data" sections in the article above, and for each of these, call a string_replace_all to do that.
#3
Posted 08 July 2012 - 07:11 PM
Web browsers generally use %20 as the replacement for spaces in URL's. Just parse that out.
#4
Posted 09 July 2012 - 01:58 AM
Yeah, it's a bit late now as I already did what I planned. I did do it manually with string_replace_all, I was hoping for an easier way though as I was in a rush.
Thanks anyway.
Thanks anyway.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











