How to get parameters from a coded URL through get
HTTP//Domain/?ID%3D3%26SERVER_ID%3DS1%26SIGN%3DF44F5AC51CBC95E13102CD5657082DC6
Want to $_get from this link to the three parameters of ID server_id and sign
How does the PHP file that receives the parameter need to process this link first?
Can you be a little more specific?
I'm a rookie, thank you. decoding URL PHP
------Solution--------------------
Reference:
reference: PHP code?12$str = "http://www.baidu.com/id%3D3%26server_id%3Ds1%26sign% 3df44f5ac51cbc95e13102cd5657082dc6 "; Echo UrlDecode ($STR);
Through $_get, it should be accessible.
The parameters to be obtained are dynamic, each time
...
$a = Explode (' & ', $QUERY _string);
$i = 0;
while ($i < count ($a)) {
$b = Split (' = ', $a [$i]);
Echo ' Value for parameter ', Htmlspecialchars (UrlDecode ($b [0])),
' Is ', Htmlspecialchars (UrlDecode ($b [1])), "
\ n ";
$i + +;
}
This is an example of a handbook.
------Solution--------------------
Var_dump (($_server[' Request_uri '));
Var_dump (($_server[' script_name '));
------Solution--------------------
$str = UrlDecode ($_server[' query_string ');
Parse_str ($str, $get);
Var_dump ($get [' sign ']);