1
0
Fork 0
forked from blallo/rss-bridge

[contents] Limit cURL protocols to HTTP and HTTPS

This commit is contained in:
logmanoriginal 2018-03-25 15:28:00 +02:00
parent 6caca4946b
commit 5bd9c1611d

View file

@ -6,6 +6,7 @@ function getContents($url, $header = array(), $opts = array()){
curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_USERAGENT, ini_get('user_agent')); curl_setopt($ch, CURLOPT_USERAGENT, ini_get('user_agent'));
curl_setopt($ch, CURLOPT_ENCODING, ''); curl_setopt($ch, CURLOPT_ENCODING, '');
curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
if(is_array($opts)) { if(is_array($opts)) {
foreach($opts as $key => $value) { foreach($opts as $key => $value) {