lets say I have an url
http://www.somepage.com/clicker.php?id_campaign=8&id_email=9324&url=https://www.google.com/search?q=dog&sxsrf=ALeKk019eteEpAwVf2Fk4qYo7TiwhuMQ_Q:1596666153666&source=lnms&tbm=isch&sa=X&ved=2ahUKEwiqzqf3jIXrAhUisaQKHRayBWAQ_AUoAXoECBkQAw&biw=1920&bih=921#imgrc=M4wsJO0A7OQfTM
and im trying to get out the parameters id_campaign, id_email and url however, using the code:
$url = htmlspecialchars_decode($url);
$parts = parse_url($url);
parse_str($parts['query'], $query);
when printing $parts['query'] it only gives me:
https://www.google.com/search?q=dog
because rest of the url it consider as another parameter...
so how do I get all the url parameter out of $url?
url_encodegoogle.com/… before putting it in the url.