2003-12-28 //$Id$ //Constants define('SCRIPTFILE', '/usr/local/bin/image2bgavi'); //Avi file download. This must happen before anything was written to the output //or headers were sent. if (isset($_GET['download'])) : $download_path = '/tmp/php' . $_GET['download'] . '.dir/movix.music.avi'; if (preg_match('!^[a-zA-Z0-9]+$!', $_GET['download']) && file_exists($download_path)) : error_log("downloading movix.music.avi from $download_path", 0); //rem debug header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=movix.music.avi"); readfile($download_path); endif; exit(); //Preview image elseif (isset($_GET['preview'])) : $download_path = '/tmp/php' . $_GET['preview'] . '.dir/preview.jpg'; if (preg_match('!^[a-zA-Z0-9]+$!', $_GET['preview']) && file_exists($download_path)) : //error_log("downloading movix.music.avi from $download_path", 0); //rem debug header("Content-type: image/jpeg"); readfile($download_path); endif; exit(); //Get the script sources elseif (isset($_GET['source'])) : if ($_GET['source'] == 'php') : $filename = 'image2bgavi.php'; else : $filename = SCRIPTFILE; endif; //Transfer the file as plain text header('Content-type: text/plain'); readfile($filename); exit(); endif; ?>
Generation of the movie file succeeded. Click here to download it.
Note: the file will be deleted from the server in about two hours.
This is how the converted file might look:
The movie file couldn't be generated. Please send your image file to balazs@tud.at so the problem can be solved.