Modified:Added timeout limit to curl request for getting cb news

This commit is contained in:
Awais-cb 2017-05-29 11:50:50 +05:00
parent e0777a60cb
commit 298d83b812

View file

@ -3160,6 +3160,7 @@
'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/3.0.0.2');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 600);
$contents = curl_exec($ch);
curl_close($ch);