Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

escaping get request in php

11:37 pm on Jun 29, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 6, 2002
votes: 0

I am looking to send some information with the Get request but when I read the variable in PHP it is all encoded. I have been trying to locate the function that uncodes this. Anyone know this off the top of their head?


2:24 pm on June 30, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:June 7, 2002
votes: 0

rawurldecode() and urldecode()

The difference (as far as I can see) is that if spaces have been encoded as +, you will need urldecode().

rawurldecode("foo%20bar") == "foo bar"
urldecode("foo+bar") == "foo bar"

If in doubt, urldecode() is probably the one to use.

To encode URLs, of course, use rawurlencode() or urlencode() as appropriate.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members