forked from uup-dump/api
Add curl timeouts
This commit is contained in:
parent
6e55605fb2
commit
0ea0de8c2c
@ -64,6 +64,8 @@ function sendWuPostRequest($url, $postData) {
|
|||||||
curl_setopt($req, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($req, CURLOPT_RETURNTRANSFER, 1);
|
||||||
curl_setopt($req, CURLOPT_ENCODING, '');
|
curl_setopt($req, CURLOPT_ENCODING, '');
|
||||||
curl_setopt($req, CURLOPT_POSTFIELDS, $postData);
|
curl_setopt($req, CURLOPT_POSTFIELDS, $postData);
|
||||||
|
curl_setopt($req, CURLOPT_CONNECTTIMEOUT, 5);
|
||||||
|
curl_setopt($req, CURLOPT_TIMEOUT, 15);
|
||||||
curl_setopt($req, CURLOPT_SSL_VERIFYPEER, 0);
|
curl_setopt($req, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
curl_setopt($req, CURLOPT_HTTPHEADER, array(
|
curl_setopt($req, CURLOPT_HTTPHEADER, array(
|
||||||
'User-Agent: Windows-Update-Agent/10.0.10011.16384 Client-Protocol/2.50',
|
'User-Agent: Windows-Update-Agent/10.0.10011.16384 Client-Protocol/2.50',
|
||||||
|
Loading…
Reference in New Issue
Block a user