- From: Ian Clelland <ian@veryfresh.com>
- Date: Wed, 3 Dec 2003 11:50:25 -0800
- To: www-talk@w3.org
On Sat, Nov 29, 2003 at 12:56:24PM -0000, Gon?alo Silva Dias wrote: > Hi ppl, > > How can I send characters in the url like > http://parede.hn.org/index.php?info=? > > Anyone knows how to do that? If you need to include reserved characters, such as "?", ";" or "/", in a URL query part (the bit after the first '?'), you have to encode them. You can send any ASCII character in a URL by encoding it as "%hh" where "hh" is the hex value for the character code. For example, "?" encodes as "%3f", and "%" encodes as "%25". Your example, then, would be a proper URL like this: http://parede.hn.org/index.php?info=%3f If you are using PHP to construct your URLs, use the function urlencode() on your strings before including them in the URL. (see http://www.php.net/manual/en/function.urlencode.php for more details) Hope this helps, Ian Clelland <ian@veryfresh.com>
Received on Wednesday, 3 December 2003 14:50:23 UTC