Codeigniter library to get direct download of Google Drive file link
$this->load->library('gdirect');
// true: redirect download
// false: string output
$this->gdirect->generateLink('DRIVE_ID', false);
$this->gdirect->get_driveid_from_url('https://drive.google.com/open?id=16NdH7CuNnt4FUkakL7R61D0XptKMoSyC')
// output: 16NdH7CuNnt4FUkakL7R61D0XptKMoSyC