public static function getParameter($param = false, $url = false)
    {
        if (empty($param)) {
            return null;
        }
        if (!$url || !strlen($url)) {
            $url = self::getRequestUrl();
        }

        $parsed_url = self::parse($url);
        $params = (isset($parsed_url['params']) && count($parsed_url['params'])) 
            ? $parsed_url['params'] : false;

        if ($param && strlen($param)) {
            if ($params) {
                foreach($params as $p=>$v) {
                    if ($p==$param) return $v;
                }
            }
            return false;
        }
        return $params;
    }