Re: urlencode vs rawurlencode

From: Date: Fri, 26 Jul 2002 04:46:49 +0000
Subject: Re: urlencode vs rawurlencode
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-109668@lists.php.net to get a copy of this message
On 25 Jul 2002 at 23:50, Bob Lockie wrote: > What is the difference between urlencode and rawurlencode? > The documentation isn't clear but I'm sure there is some difference. What documenation are you using? The one I find here: http://www.php.net/manual/en/function.urlencode.php is pretty darn good and the user comments are often quite helpful. The difference between the 2 is in the encoding of spaces. urlencode uses '+' for spaces whereas rawurlencode uses '%20' for spaces. > Returns a string in which all non-alphanumeric characters except -_. > have been replaced with a percent (%) sign followed by two hex digits > and spaces encoded as plus (+) signs. It is encoded the same way that > the posted data from a WWW form is encoded, that is the same way as in > application/x-www-form-urlencoded media type. This differs from the > RFC1738 encoding . Peter

« previous php.general (#109668) next »