]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Network.php
Support for fetching non-public content / preparations for forum posts
[friendica.git] / src / Util / Network.php
index 255b3c8c4d3e1b8d1f41d1b8358b27251102a5d2..0ff34f120ad9669f19015984c40f81c1bbd4d9d3 100644 (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());