Support for fetching non-public content / preparations for forum posts

This commit is contained in:
Michael 2018-11-03 21:37:08 +00:00
parent 1395bdc188
commit 8f27e3aeb1
5 changed files with 188 additions and 30 deletions

View file

@ -83,6 +83,7 @@ class Network
* 'novalidate' => do not validate SSL certs, default is to validate using our CA list
* 'nobody' => only return the header
* 'cookiejar' => path to cookie jar file
* 'header' => header array
*
* @return CurlResult
*/
@ -136,6 +137,10 @@ class Network
);
}
if (!empty($opts['header'])) {
curl_setopt($ch, CURLOPT_HTTPHEADER, $opts['header']);
}
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@curl_setopt($ch, CURLOPT_USERAGENT, $a->getUserAgent());