<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');


class Download extends MX_Controller 
{

	public function __construct() {
		parent::__construct();
                $user = $this->session->userdata ( 'userInfo' );
		$this->vservices->setApiUrl($this->config->item('api_url'));
		$this->vservices->setConnection($this->curl);
		$this->vservices->setUserId($user['us_id']);
	}
	
	public function getFile () {
                $file = $this->config->item('api_url').'uploads/space/3/3854/1.JPG';
                header('Content-Description: File Transfer');
                header('Content-Type: application/octet-stream');
                header('Content-Disposition: attachment; filename='.basename($file));
                header('Expires: 0');
                header('Cache-Control: must-revalidate');
                header('Pragma: public');
                header('Content-Length: ' . filesize($file));
                readfile($file);
                exit;
            
	}
       

}

/* End of file privatecontent.php */
/* Location: ./application/modules/ajax/controllers/privatecontent.php */