In my actions class in symfony, i’m sending a curl_exec to a url like this
$headerinfo = apache_request_headers();
curl_setopt($ch1, CURLOPT_URL, $returnurl);
curl_setopt($ch1, CURLOPT_HEADER, 0);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch1, CURLOPT_POSTFIELDS, $rtyinstance);
curl_setopt($ch1, CURLOPT_USERAGENT,$headerinfo['User-Agent']);
$result = curl_exec($ch1);
$responseCode = curl_getinfo($ch1, CURLINFO_HTTP_CODE);
It is executing but the execution runs indefinitely i want to execute this only for 5 minutes and then register into error log if it is not 200
I checked set_time_limit but it for the whole page or actions which i cannot use…..
Please tell me how to do that…….
1 Answer