static function urlunparse($scheme, $host, $port = null, $path = '/',
                        $query = '', $fragment = '')
    {

        if (!$scheme) {
            $scheme = 'http';
        }

        if (!$host) {
            return false;
        }

        if (!$path) {
            $path = '';
        }

        $result = $scheme . "://" . $host;

        if ($port) {
            $result .= ":" . $port;
        }

        $result .= $path;

        if ($query) {
            $result .= "?" . $query;
        }

        if ($fragment) {
            $result .= "#" . $fragment;
        }

        return $result;
    }
static function urlunparse($scheme, $host, $port = null, $path = '/',
                        $query = '', $fragment = '')
    {

        if (!$scheme) {
            $scheme = 'http';
        }

        if (!$host) {
            return false;
        }

        if (!$path) {
            $path = '';
        }

        $result = $scheme . "://" . $host;

        if ($port) {
            $result .= ":" . $port;
        }

        $result .= $path;

        if ($query) {
            $result .= "?" . $query;
        }

        if ($fragment) {
            $result .= "#" . $fragment;
        }

        return $result;
    }
static function urlunparse ( $ scheme , $ host , $ port = null , $ path = '/' , $ query = '' , $ fragment = '' ) { if ( ! $ scheme ) { $ scheme = 'http' ; } if ( ! $ host ) { return false ; } if ( ! $ path ) { $ path = '' ; } $ result = $ scheme . "://" . $ host ; if ( $ port ) { $ result .= ":" . $ port ; } $ result .= $ path ; if ( $ query ) { $ result .= "?" . $ query ; } if ( $ fragment ) { $ result .= "#" . $ fragment ; } return $ result ; }
Implements python's urlunparse, which is not available in PHP.
Given the specified components of a URL, this function rebuilds
and returns the URL.

@access private
@param string $scheme The scheme (e.g. 'http').  Defaults to 'http'.
@param string $host The host.  Required.
@param string $port The port.
@param string $path The path.
@param string $query The query.
@param string $fragment The fragment.
@return string $url The URL resulting from assembling the
specified components.
Implements python s urlunparse which is not available in PHP . Given the specified components of a URL this function rebuilds and returns the URL .