hi don't know how to get out of this situation i am trying to increase the max_execution_time to 5000 for e.g ini_set('max_execution_time',5000). it do shows the execution_time set to 5000 on echo ini_get('max_execution_time') however it dosen't work as connection with server closes early than 5000 sec.
I am trying to fetch XML with the API and then converting that data in array and that array afterwards is being used in loop to insert array values in my database. I am using codeignitor please see the below code.
My controller
public function get_chassis_badge_detail()
{
$this->load->model('md_api_test','md_api');
if($this->md_api->get_chassis_badge_detail())
{
$this->load->view('api_test',['car_detail' => '']);
}
}
My Model:
public function get_chassis_badge_detail()
{
//// for kuzov insertion in to database from stats auction
$this->load->library('auction_api');
$query = "select count(distinct kuzov) from stats";
$total_kuzov = $this->auction_api->aj_get_clean($query);
$cycle_end = round($total_kuzov[0]['TAG0']/250)+1;
$query = "select kuzov,model_id from stats group by kuzov order by model_id ASC";
$arr = '';
for($k=0; $k<($cycle_end); $k++)
{
$query .= " limit ".($k*250).",250";
$arr[] = $this->auction_api->aj_get_clean($query);
$query = "select kuzov,model_id from stats group by kuzov order by model_id ASC";
if (isset($arr[$k][0]))
{
for($b=0; $b<count($arr[$k]); $b++)
{
$trim_val=trim($arr[$k][$b]['KUZOV']);
if(!empty($trim_val))
{
$this->db->query("INSERT INTO `dd_chassis_badge`(`model_id`, `badge`) VALUES ('".$this->db->escape_str($arr[$k][$b]['MODEL_ID'])."','".$this->db->escape_str($arr[$k][$b]['KUZOV'])."');");
}
}
}
else
{
unset($arr[$k]);
break;
}
}
return true;
}