Taki błąd mi wyskakuje mógł by ktoś powiedzieć jak to naprawić

A PHP Error was encountered
Severity: Notice
Message: Undefined index: Content-Length
Filename: libraries/remotefile.php
Line Number: 69
A PHP Error was encountered
Severity: Notice
Message: Undefined index: Content-Length
Filename: libraries/remotefile.php
Line Number: 83
Kod php pliku remotefile.php
class CI_Remotefile { public $buffer = 204800; public $tmp_dir = './temp'; public $error = ''; private $headers = ''; public $CI = ''; /** * File Download Constructor * * The constructor sets up the download system as ready for files */ function CI_Remotefile() { $this->CI =& get_instance(); log_message('debug', "Remote File Transfer Class Initialized"); } /** * Setup * * Sets Config Vars * * @access public * @param Config Array * @return null */ { { $this->_initialize($config); } } function getHeaders($url) { $this->headers = get_headers($url, true); return $this->headers['Content-Length']; } function headersToArray($string) { foreach( $lines as $line) { } } function remoteSize() { return $this->headers['Content-Length']; } function getReferer() { { return $this->headers['Referer']; } else { return false; } } function isRedirect() { { return $this->headers['Location']; } else { return false; } } function fetchFile($url, $fid, $max_size, $fp=NULL) { if($parsedurl == 'http') { return $this->_httpTransfer($url, $fid, $max_size, $fp); } else if($parsedurl == 'ftp') { return $this->_ftpTransfer($url, $fid, ($max_size * 1024 * 1024)); } else { exit; } } private function _httpTransfer($url, $fid, $max_size, $fp=NULL) { $nurl = $url; { $user = $parsedurl['user']; } { $pass = $parsedurl['pass']; } $host = $parsedurl["host"]; $hostname = $host; $port = "80"; $query = ""; $port = $port ? $port : "80"; // Follow redirection $this->getHeaders($url); $isRedi = false; while($this->isRedirect()) { $nurl = $this->isRedirect(); $isRedi = true; $this->getHeaders($nurl); } if($isRedi) { $url = $nurl; // Get items of new url $referer = $this->getReferer(); $host = $parsedurl["host"]; $hostname = $host; $port = $port ? $port : "80"; } if (!$sh) { return false; } if (!$parsedurl["path"]) { $parsedurl["path"] = "/"; } $request = ""; $request.= "GET ".$parsedurl["path"].(isset($parsedurl["query"]) ? '?'.$parsedurl["query"] : '')." HTTP/1.0\r\n"; $request.= "Host: $hostname\r\n"; { $request.= "Referer: ".$referer."\r\n"; } { } $request.= "\r\n"; //Send The Request // if no filepointer is given, make a temp file and open it for writing if(!$fp) { $sendFileName = true; } $size = $this->remoteSize(); if($size > ($max_size * 1024*1024)) { return false; } $this->CI->db->insert('progress', array('progress' => 0, 'curr_time' => $_SERVER['REQUEST_TIME'] , 'total' => $size, 'start_time' => $_SERVER['REQUEST_TIME'], 'fid' => $fid)); $i = $p = 0; $endHeaders = false; $rstr=''; // download the file { if(!$endHeaders) { { if($isRedi) { $headers = $headers[0]; $this->headersToArray($headers); $size = $this->remoteSize(); $this->CI->db->where('fid', $fid); } $endHeaders = true; } else { continue; } } $string = NULL; if($i % 10 == 0) { $this->CI->db->where('fid', $fid); } } // if passed a file pointer return true, if not return temp file name if(!$sendFileName) { return true; } else { return $tmpfname; } } private function _ftpTransfer($url, $fid, $max_size, $fp=NULL) { $nurl = $url; $user = "anonymous"; { $user = $parsedurl['user']; } $pass = 'xtraupload.v2@gmail.com'; { $pass = $parsedurl['pass']; } $host = $hostname = $parsedurl["host"]; $this->CI->load->library('ftp'); $config['hostname'] = $hostname; $config['username'] = $user; $config['password'] = $pass; $config['port'] = $port; $config['passive'] = TRUE; $config['debug'] = FALSE; $this->CI->ftp->connect($config); if($this->CI->ftp->error) { $error = $this->CI->ftp->get_error(); log_message('error', $error); $this->error = $error; show_error($error); return false; } $size = $this->CI->ftp->remote_filesize($path); if(!$size or ($max_size < $size)) { log_message('error', "CAN NOT FTP SIZE"); show_error("CAN NOT FTP SIZE"); $this->error = 'CAN NOT FTP SIZE'; return false; } $this->CI->db->insert('progress', 'progress' => 0, 'curr_time' => $_SERVER['REQUEST_TIME'], 'total' => $size, 'start_time' => $_SERVER['REQUEST_TIME'], 'fid' => $fid) ); $fname = $this->CI->ftp->download_xu2($path, $fid, $max_size); if(!$fname) { $this->error = 'CAN NOT FTP TRANSFER'; log_message('error', "CAN NOT FTP TRANSFER"); show_error("CAN NOT FTP TRANSFER"); return false; } $this->CI->ftp->close(); return $fname; } } ?>
Pomożę ktoś albo da chodziaż jakąś wzkazówke?