[eluser]moin cse[/eluser]
I am using codeigniter downlaod library to download content from my application, But need to track every successful download that is I need to update database, I can call a db function before downlaod script execute, but if download is unsuccessful due to power failure or internet connection interruption then I need not to update db or something like that.
Code:
$this->load->helper('download');
$data['order_id'] = $order_id;
$data['app_code'] = $app_code;
$app_download_info = $this->apiinfo_model->insert_app_download_info($data);
$file_path = "http://localhost/app/store/132.txt";
$data = file_get_contents($file_path);
$name = 'test_name.txt';
force_download($name, $data);
So how can I achieve this,
any idea will be highly appreciated.
Thanks in Advance
-Moin