Reputation: 37
I've increased the timeout but it doesn't work.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost.com/test.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 999);
$response = curl_exec($ch);
print_r($response);
Upvotes: 2
Views: 185
Reputation: 270
You need to add CURLOPT_CONNECTTIMEOUT option to it.
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 600); //10 minutes
Upvotes: 4