All pastes #620491 Raw Edit

Mime Type

public text v1 · immutable
·published 2007-07-15 15:07 UTC
rendered paste body
		if ($this->mime == null) $this->mime = "application/octet-stream"; //default mime

	function header($size,$seek_start=null,$seek_end=null) {
		header("Cache-control: private\n"); // fix for IE to correctly download files
		header("Pragma: no-cache\n");       // fix for http/1.0
		header('Content-type: ' . $this->mime);
		header('Content-Disposition: attachment; filename="' . $this->filename . '"');
		header('Last-Modified: ' . date('D, d M Y H:i:s \G\M\T' , $this->data_mod));