Add docs for scheduled refresh (#11)
- Add user agent for feed requests
This commit is contained in:
@@ -26,6 +26,10 @@ class Feed {
|
||||
/** @var string The XML namespace for XHTML */
|
||||
public const string XHTML_NS = 'http://www.w3.org/1999/xhtml';
|
||||
|
||||
/** @var string The user agent for Feed Reader Central's refresh requests */
|
||||
private const string USER_AGENT =
|
||||
'FeedReaderCentral/' . FRC_VERSION . ' +https://bitbadger.solutions/open-source/feed-reader-central';
|
||||
|
||||
/**
|
||||
* When parsing XML into a DOMDocument, errors are presented as warnings; this creates an exception for them
|
||||
*
|
||||
@@ -170,6 +174,7 @@ class Feed {
|
||||
curl_setopt($docReq, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($docReq, CURLOPT_CONNECTTIMEOUT, 5);
|
||||
curl_setopt($docReq, CURLOPT_TIMEOUT, 15);
|
||||
curl_setopt($docReq, CURLOPT_USERAGENT, self::USER_AGENT);
|
||||
|
||||
$result = [
|
||||
'content' => curl_exec($docReq),
|
||||
|
||||
Reference in New Issue
Block a user