orange08 Posted October 1, 2009 Share Posted October 1, 2009 i came across urlencode() this function online...and know that it's used to encode URL... can i know what's the purpose of doing so? for security purpose, so that people can't see what we actually pass through the URL? Link to comment https://forums.phpfreaks.com/topic/176175-solved-urlencode/ Share on other sites More sharing options...
zq29 Posted October 1, 2009 Share Posted October 1, 2009 It has nothing to do with security, as only (almost all) non-alphanumeric characters are encoded, such as spaces, brackets, etc. This function is convenient when encoding a string to be used in a query part of a URL, as a convenient way to pass variables to the next page. Link to comment https://forums.phpfreaks.com/topic/176175-solved-urlencode/#findComment-928409 Share on other sites More sharing options...
salathe Posted October 1, 2009 Share Posted October 1, 2009 It simply encodes non-URL-safe characters into ones which are URL-safe using a widely accepted method (% followed by hexadecimal representation of the character). It has nothing to do with security or obfuscation of data. See: http://php.net/urlencode Link to comment https://forums.phpfreaks.com/topic/176175-solved-urlencode/#findComment-928410 Share on other sites More sharing options...
orange08 Posted October 1, 2009 Author Share Posted October 1, 2009 It simply encodes non-URL-safe characters into ones which are URL-safe using a widely accepted method (% followed by hexadecimal representation of the character). It has nothing to do with security or obfuscation of data. See: http://php.net/urlencode i did read about the link...but, i just can't understand then why to use it...and if i didn't use it to encode my link, then what is its shortcoming? Link to comment https://forums.phpfreaks.com/topic/176175-solved-urlencode/#findComment-928415 Share on other sites More sharing options...
orange08 Posted October 1, 2009 Author Share Posted October 1, 2009 It simply encodes non-URL-safe characters into ones which are URL-safe using a widely accepted method (% followed by hexadecimal representation of the character). It has nothing to do with security or obfuscation of data. See: http://php.net/urlencode i did read about the link...but, i just can't understand then why to use it...and if i didn't use it to encode my link, then what is its shortcoming? i think i understand it now. thanks! Link to comment https://forums.phpfreaks.com/topic/176175-solved-urlencode/#findComment-928447 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.