port example

        WP_Http::buildCookieHeader( $parsed_args );

        $handle = curl_init();

        // cURL offers really easy proxy support.         $proxy = new WP_HTTP_Proxy();

        if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {

            curl_setopt( $handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP );
            curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() );
            curl_setopt( $handle, CURLOPT_PROXYPORT, $proxy->port() );

            if ( $proxy->use_authentication() ) {
                curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY );
                curl_setopt( $handle, CURLOPT_PROXYUSERPWD, $proxy->authentication() );
            }
        }

        $is_local   = isset( $parsed_args['local'] ) && $parsed_args['local'];
        $ssl_verify = isset( $parsed_args['sslverify'] ) && $parsed_args['sslverify'];
        if ( $is_local ) {
            /** This filter is documented in wp-includes/class-wp-http-streams.php */
            

        $options['verify'] = apply_filters( 'https_ssl_verify', $options['verify']$url );

        // Check for proxies.         $proxy = new WP_HTTP_Proxy();
        if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
            $options['proxy'] = new WpOrg\Requests\Proxy\Http( $proxy->host() . ':' . $proxy->port() );

            if ( $proxy->use_authentication() ) {
                $options['proxy']->use_authentication = true;
                $options['proxy']->user               = $proxy->username();
                $options['proxy']->pass               = $proxy->password();
            }
        }

        // Avoid issues where mbstring.func_overload is enabled.         mbstring_binary_safe_encoding();

        
        $connection_error_str = null;

        if ( ! WP_DEBUG ) {
            // In the event that the SSL connection fails, silence the many PHP warnings.             if ( $secure_transport ) {
                $error_reporting = error_reporting( 0 );
            }

            if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
                // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged                 $handle = @stream_socket_client(
                    'tcp://' . $proxy->host() . ':' . $proxy->port(),
                    $connection_error,
                    $connection_error_str,
                    $connect_timeout,
                    STREAM_CLIENT_CONNECT,
                    $context
                );
            } else {
                // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged                 $handle = @stream_socket_client(
                    $connect_host . ':' . $parsed_url['port'],
                    $connection_error,
                    
Home | Imprint | This part of the site doesn't use cookies.