$url='http://shop.m.taobao.com/shop/coupon.htm?seller_id=1888136962&activity_id=a3cc6e4ad26e4f0ea2ba144d2b60364d';
$parse_url=parse_url($url);
print_r($parse_url);
parse_str($parse_url['query'],$output);
print_r($output);
?>
输出:
Array
(
[scheme] => http
[host] => shop.m.taobao.com
[path] => /shop/coupon.htm
[query] => seller_id=1888136962&activity_id=a3cc6e4ad26e4f0ea2ba144d2b60364d
)
Array
(
[seller_id] => 1888136962
[activity_id] => a3cc6e4ad26e4f0ea2ba144d2b60364d
)
参考资料:
https://stackoverflow.com/questions/8469767/get-url-query-string