Welcome to WebmasterWorld Guest from 54.227.52.24

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

escaping get request in php

     

Lisa

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

WebmasterWorld Senior Member 10+ Year Member



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?

Thanks!

rewboss

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

10+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month