public static function getRefererQueryParam($url, $key)
    {
        if (!$url) {
            return null;
        }

        $query = [];

        parse_str(parse_url($url, PHP_URL_QUERY), $query);
        if (isset($query[$key])) {
            return $query[$key];
        }

        return null;
    }
public static function getRefererQueryParam($url, $key)
    {
        if (!$url) {
            return null;
        }

        $query = [];

        parse_str(parse_url($url, PHP_URL_QUERY), $query);
        if (isset($query[$key])) {
            return $query[$key];
        }

        return null;
    }
public static function getRefererQueryParam ( $ url , $ key ) { if ( ! $ url ) { return null ; } $ query = [ ] ; parse_str ( parse_url ( $ url , PHP_URL_QUERY ) , $ query ) ; if ( isset ( $ query [ $ key ] ) ) { return $ query [ $ key ] ; } return null ; }
Searches the url for a query parameter of a given key.
@param string $url
@param string $key
@return mixed
Searches the url for a query parameter of a given key .