在PHP中设置Curl的超时
$ch = curl_init();$headers["Content-Length"] = strlen($postString);$headers["User-Agent"] = "Curl/1.0"; curl_setopt($ch, CURLOPT_URL, $requestUrl);curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, 'admin:');curl_setopt($ch,CURLOPT_TIMEOUT,1000);$response = curl_exec($ch);curl_close($ch);
交互式爱情