Page 1 of 1
Pound sign in submitted URL query string
Posted: Sat Dec 31, 2005 1:58 pm
by JustChuck
We have a client that wishes to transmit data to us via a URL. The problem is the string may contain the pound sign(#). As expected, all data following this is blocked in our PHP script. I've tried cleaning up the URL before grabbing the variables with preg_replace and str_replace on the query as $_SERVER['QUERY_STRING'], but no luck. Is there a way to clean up the incoming URL -- remove the "#" -- and grab all the variables?
Posted: Sat Dec 31, 2005 5:39 pm
by josh
Tell him to take care of it in his end by using urlencode()
urlencode turns # to %23 for example, this is what standards are for
Posted: Mon Jan 02, 2006 11:07 pm
by djot
-
Perhaps it's better to
- use POST instead of GET
- write headers directly without hidden (e.g. form) data
- or perhaps best: use sockets (+https).
djot
-
Posted: Mon Jan 02, 2006 11:14 pm
by timvw
It took me a while to figure out how i could allow a user to post xml to my php script, but here it is anyway:
service
And here is the client that i've used to test it:
client