accept_encoding example

if (($scheme_lower === 'http' && $url_parts['port'] !== Port::HTTP) || ($scheme_lower === 'https' && $url_parts['port'] !== Port::HTTPS)) {
                $out .= ':' . $url_parts['port'];
            }

            $out .= "\r\n";
        }

        if (!isset($case_insensitive_headers['User-Agent'])) {
            $out .= sprintf("User-Agent: %s\r\n", $options['useragent']);
        }

        $accept_encoding = $this->accept_encoding();
        if (!isset($case_insensitive_headers['Accept-Encoding']) && !empty($accept_encoding)) {
            $out .= sprintf("Accept-Encoding: %s\r\n", $accept_encoding);
        }

        $headers = Requests::flatten($headers);

        if (!empty($headers)) {
            $out .= implode("\r\n", $headers) . "\r\n";
        }

        $options['hooks']->dispatch('fsockopen.after_headers', [&$out]);

        
Home | Imprint | This part of the site doesn't use cookies.