Location: PHPKode > projects > StreamOnTheFly > node/www/getUserFile.php
<?php // -*- tab-width: 3; indent-tabs-mode: 1; -*- 

/*  
 * $Id: getUserFile.php,v 1.4 2003/05/30 16:31:58 andras Exp $
 * Created for the StreamOnTheFly project (IST-2001-32226)
 * Authors: András Micsik, Máté Pataki, Tamás Déri 
 *          at MTA SZTAKI DSD, http://dsd.sztaki.hu
 */

require("init.inc.php");

$filename = sotf_Utils::getParameter('filename');

$filename = sotf_Utils::getFileInDir($user->getUserDir(), $filename);

$file = & new sotf_File($filename);
if ($file->type != "none")
{
	header("Content-type: " . $file->mimetype . "\n");
	header("Content-transfer-encoding: binary\n"); 
	header("Content-length: " . filesize($filename) . "\n");   

	// send file
	readfile($filename);
}
else
	raiseError("download_problem");

$page->logRequest();

?>
Return current item: StreamOnTheFly