* @see https://codeigniter.com/user_guide/general/urls.html */ public function index() { $this->load->view('welcome_message'); } public function short() { $uri = $this->uri->segment(2); //echo $uri; $this->load->model('PD_Model'); $this->load->library('AWS_S3'); $room_info = $this->PD_Model->selectCustomRecords(array('*'),array('composition_id' => $uri),VIDEO_ROOM_INFO); if(count($room_info)) { $pd_master_details = $this->PD_Model->getPDMasterDetails($room_info[0]['fk_pd_id']); $bucket_name = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id']; $final_key = 'pd'.$pd_master_details[0]['pd_id'].'/video/'.$uri.'.mp4'; $singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$final_key,'+1 hour'); // echo 'sdj'; // die(); header("Location: $singed_uri"); } else { header('Location: https://google.com'); } } }