Renamed “timeout” var to “functimeout”

This commit is contained in:
pezcurrel 2023-12-29 09:59:08 +01:00
parent 79e39f6783
commit cce037f169

View file

@ -1,6 +1,6 @@
<?php
function gurl($url,$conntimeout,$timeout=45,$headers=[]) {
function gurl($url,$conntimeout=8,$functimeout=45,$headers=[]) {
$curli=curl_init();
// i 2 qui sotto servono a far sì che ctrl+c sia intercettato a monte
/*curl_setopt($curli,CURLOPT_NOPROGRESS,false);
@ -9,7 +9,7 @@ function gurl($url,$conntimeout,$timeout=45,$headers=[]) {
curl_setopt($curli,CURLOPT_RETURNTRANSFER,true);
curl_setopt($curli,CURLOPT_FAILONERROR,true);
curl_setopt($curli,CURLOPT_CONNECTTIMEOUT,$conntimeout);
curl_setopt($curli,CURLOPT_TIMEOUT,$timeout);
curl_setopt($curli,CURLOPT_TIMEOUT,$functimeout);
curl_setopt($curli,CURLOPT_HTTPHEADER,$headers);
curl_setopt($curli,CURLOPT_HEADER,true);
curl_setopt($curli,CURLOPT_ENCODING,'');