Add script 'get-openssl-version.sh'.

This commit is contained in:
2023-06-21 11:09:08 +02:00
parent 0a7a61049a
commit 14056b44dd
5032 changed files with 340126 additions and 0 deletions

View File

@ -0,0 +1,62 @@
<?php
namespace dokuwiki;
use dokuwiki\HTTP\DokuHTTPClient;
/**
* Fetch an URL using our own HTTPClient
*
* Replaces SimplePie's own class
*/
class FeedParserFile extends \SimplePie\File
{
protected $http;
/** @noinspection PhpMissingParentConstructorInspection */
/**
* Inititializes the HTTPClient
*
* We ignore all given parameters - they are set in DokuHTTPClient
*
* @inheritdoc
*/
public function __construct(
$url,
$timeout = 10,
$redirects = 5,
$headers = null,
$useragent = null,
$force_fsockopen = false,
$curl_options = array()
) {
$this->http = new DokuHTTPClient();
$this->success = $this->http->sendRequest($url);
$this->headers = $this->http->resp_headers;
$this->body = $this->http->resp_body;
$this->error = $this->http->error;
$this->method = \SimplePie\SimplePie::FILE_SOURCE_REMOTE | \SimplePie\SimplePie::FILE_SOURCE_FSOCKOPEN;
return $this->success;
}
/** @inheritdoc */
public function headers()
{
return $this->headers;
}
/** @inheritdoc */
public function body()
{
return $this->body;
}
/** @inheritdoc */
public function close()
{
return true;
}
}