$31 GRAYBYTE WORDPRESS FILE MANAGER $90

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bqrcodec/test1.proid.vn/wp-includes/SimplePie/src/HTTP/

HOME
Current File : /home/bqrcodec/test1.proid.vn/wp-includes/SimplePie/src/HTTP//FileClient.php
<?php

// SPDX-FileCopyrightText: 2004-2023 Ryan Parman, Sam Sneddon, Ryan McCue
// SPDX-License-Identifier: BSD-3-Clause

declare(strict_types=1);

namespace SimplePie\HTTP;

use InvalidArgumentException;
use SimplePie\File;
use SimplePie\Misc;
use SimplePie\Registry;
use Throwable;

/**
 * HTTP Client based on \SimplePie\File
 *
 * @internal
 */
final class FileClient implements Client
{
    /** @var Registry */
    private $registry;

    /** @var array{timeout?: int, redirects?: int, useragent?: string, force_fsockopen?: bool, curl_options?: array<mixed>} */
    private $options;

    /**
     * @param array{timeout?: int, redirects?: int, useragent?: string, force_fsockopen?: bool, curl_options?: array<mixed>} $options
     */
    public function __construct(Registry $registry, array $options = [])
    {
        $this->registry = $registry;
        $this->options = $options;
    }

    /**
     * send a request and return the response
     *
     * @param Client::METHOD_* $method
     * @param array<string, string> $headers
     *
     * @throws ClientException if anything goes wrong requesting the data
     */
    public function request(string $method, string $url, array $headers = []): Response
    {
        // @phpstan-ignore-next-line Enforce PHPDoc type.
        if ($method !== self::METHOD_GET) {
            throw new InvalidArgumentException(sprintf(
                '%s(): Argument #1 ($method) only supports method "%s".',
                __METHOD__,
                self::METHOD_GET
            ), 1);
        }

        try {
            $file = $this->registry->create(File::class, [
                $url,
                $this->options['timeout'] ?? 10,
                $this->options['redirects'] ?? 5,
                $headers,
                $this->options['useragent'] ?? Misc::get_default_useragent(),
                $this->options['force_fsockopen'] ?? false,
                $this->options['curl_options'] ?? []
            ]);
        } catch (Throwable $th) {
            throw new ClientException($th->getMessage(), $th->getCode(), $th);
        }

        if ($file->error !== null && $file->get_status_code() === 0) {
            throw new ClientException($file->error);
        }

        return $file;
    }
}

Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
18 Mar 2026 5.12 PM
bqrcodec / bqrcodec
0755
Client.php
0.593 KB
16 Sep 2025 10.47 PM
bqrcodec / bqrcodec
0644
ClientException.php
0.325 KB
16 Sep 2025 10.47 PM
bqrcodec / bqrcodec
0644
FileClient.php
2.214 KB
16 Sep 2025 10.47 PM
bqrcodec / bqrcodec
0644
Parser.php
14.853 KB
16 Sep 2025 10.47 PM
bqrcodec / bqrcodec
0644
Psr18Client.php
4.343 KB
16 Sep 2025 10.47 PM
bqrcodec / bqrcodec
0644
Psr7Response.php
2.126 KB
16 Sep 2025 10.47 PM
bqrcodec / bqrcodec
0644
RawTextResponse.php
2.022 KB
16 Sep 2025 10.47 PM
bqrcodec / bqrcodec
0644
Response.php
6.778 KB
16 Sep 2025 10.47 PM
bqrcodec / bqrcodec
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF