I need $_Get WITHOUT automatic urldecode
Moderator: General Moderators
I need $_Get WITHOUT automatic urldecode
I call a script...
aaa.com/script.php?id=xxxxxxx
...and I need to get the xxxxxxx part with $_GET['id'] BUT WITHOUT automatic urldecode.
In other words: I want to keep all the %2f and %3a etc. inside the xxxxxxx
Is that possible?
No, urldecode($_get) is not possible, because the xxxxxx part has been scrambled and a urldecode would give unpredictable results.
aaa.com/script.php?id=xxxxxxx
...and I need to get the xxxxxxx part with $_GET['id'] BUT WITHOUT automatic urldecode.
In other words: I want to keep all the %2f and %3a etc. inside the xxxxxxx
Is that possible?
No, urldecode($_get) is not possible, because the xxxxxx part has been scrambled and a urldecode would give unpredictable results.
Last edited by knnknn on Sun Nov 16, 2003 4:18 pm, edited 1 time in total.
it grabs the information from the URL, searches a database for anything that matches whatever you chose to grab from that url, and then posts what you want.
unless you don't want to query a database, then you can just post whatever it is or do whatever it is with the resulting variable you want.
but yeah, the problem is related
unless you don't want to query a database, then you can just post whatever it is or do whatever it is with the resulting variable you want.
but yeah, the problem is related
No it isn'tinfolock wrote:
but yeah, the problem is related
Would urlencode work? As in, to re-encode it?
Code: Select all
<?php
$_GET['blah'] = urlencode($_GET['blah']);
echo $_GET['blah'];
?>%3Fblah%3Dhello%40something%2C
Nope, because the xxxxxxxx is scambled with random characters inserted etc.RTT wrote:Would urlencode work? As in, to re-encode it?
But I think I found a solution by utilizing
$URL = $_SERVER['QUERY_STRING'];
instead of $_get.
Last edited by knnknn on Mon Nov 17, 2003 1:31 am, edited 1 time in total.