mirror of
https://github.com/unraid/webgui.git
synced 2026-05-03 00:09:27 -05:00
Set Timeout for curl process
This commit is contained in:
@@ -7,6 +7,7 @@ function httpPost($url, $data)
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT_MS, 1000);
|
||||
$response = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
return $response;
|
||||
@@ -14,5 +15,4 @@ function httpPost($url, $data)
|
||||
|
||||
$var = @parse_ini_file("/var/local/emhttp/var.ini") ?: [];
|
||||
$rtn = httpPost("http://localhost/webGui/include/SysDrivers.php", ["table"=>"t1create","csrf_token" => $var['csrf_token']]) ;
|
||||
echo $rtn ;
|
||||
?>
|
||||
Reference in New Issue
Block a user