Users can input URLs using a HTML form on my website, so they might enter something like this: http://www.example.com?test=123&random=abc, it can be anything. I need to
I needed to check an url that was relative for our system so I couldn't use parse_str. For anyone who needs it:
$urlParts = null; preg_match_all("~[\?&]([^&]+)=([^&]+)~", $url, $urlParts);