How i can use getallheaders?

software development

#1

Hi, i have function:

$header = getallheaders();
if (isset($header[‘Range’])) {
header(‘HTTP/1.0 206 Partial Content’);
$range = $header[‘Range’];
$r = explode(’=’, $range);
list($from) = explode(’-’, $r[1]);
$length = $size - $from;
$s_start = $size - $length;
$s_end = $size - 1;
fseek($fp, $s_start);
header (‘Content-Range: bytes ‘.$s_start.’-’.$s_end.’/’.$size);
header ('Content-Length: '.$length);
} else {
header('Content-Length: '. $size);
}

but this function is only supported when PHP is installed as an Apache module. How i can use this function on your web-server?

ps i don’t know how use apache_request_headers =(


#2

If you can manage with PHP4, you can still use mod_php on DreamHost servers as described in this article. (Make sure you read all the “comments”) :wink:

–rlparker


#3

thx! it’s work =))


#4

That’s good to hear; I’m glad you got it working! :slight_smile:

–rlparker