Renamed “timeout” var to “functimeout”
This commit is contained in:
parent
79e39f6783
commit
cce037f169
1 changed files with 2 additions and 2 deletions
|
@ -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,'');
|
||||
|
|
Loading…
Reference in a new issue