8f391294 by G Manojkumar

added Timeout for SmsGateway

1 parent a288bbe2
...@@ -45,7 +45,8 @@ class SmsController extends Controller ...@@ -45,7 +45,8 @@ class SmsController extends Controller
45 $ch = curl_init(); 45 $ch = curl_init();
46 curl_setopt($ch, CURLOPT_URL, $url); 46 curl_setopt($ch, CURLOPT_URL, $url);
47 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 47 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
48 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 48 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
49 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,3);
49 $response = curl_exec($ch); 50 $response = curl_exec($ch);
50 Log::useFiles(storage_path().'/logs/SMS_Messages'.date("Y-m-d").'.log'); 51 Log::useFiles(storage_path().'/logs/SMS_Messages'.date("Y-m-d").'.log');
51 Log::info("|".date('Y-m-d H:i:s', strtotime('+5 hours 30 minutes'))."|".Auth::user()->fullname."|".$kstychCall['callnumber']."|".$msgText."|".$response); 52 Log::info("|".date('Y-m-d H:i:s', strtotime('+5 hours 30 minutes'))."|".Auth::user()->fullname."|".$kstychCall['callnumber']."|".$msgText."|".$response);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!