PASTE-IT!

Holding 285M in 19668 pastes. Meet us at #paste-it.net, OFTC!
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
	if (isset($_GET['file_id']) && is_numeric($_GET['file_id'])) {
                // row is database result
		$basename = $row['filename'] . "." . $row['fileext'];
		header('Cache-Control: no-cache, must-revalidate');
		header('Pragma: no-cache');
		header("Content-type: application/force-download");
		header("Content-length: {$row['filesize']}");
		header("Content-disposition: $attachment; filename=$basename");
		$fhandle = fopen($file, "rb");
		fpassthru($fhandle);
		exit;

	} else {
		die("ko");
	}
Paste by
erore,
689 day(s) ago
18:28 15-08-2007
in syntax