How can I get the http: // domain name/parameter from an encoded url through get /? Id % 3D3% 26server_id % 3Ds1% 26 sign % 3Df44f5ac51cbc95e13102cd5657082dc6 from this link $ _ GET to id & nbsp; server_id & nbsp; & how does nb get parameters from encoded URLs through get?
Http: // domain name /? Id % 3D3% 26server_id % 3Ds1% 26 sign % 3Df44f5ac51cbc95e13102cd5657082dc6
You want to GET the $ _ GET to id server_id and sign parameters from this link.
How do I deal with this link before receiving the php file of parameters?
Can I be more specific?
Newbie, thank you for decoding url php
------ Solution --------------------
Reference:
Reference: PHP code? 12 $ str = "http://www.baidu.com/id%3D3%26server_id%3Ds1%26sign%3Df44f5ac51cbc95e13102cd5657082dc6"; echo urldecode ($ str );
$ _ GET should be available.
The parameters to be obtained are dynamic ......
$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 the manual.
------ 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'] );