19 lines
463 B
PHP
19 lines
463 B
PHP
<?php
|
|
ini_set("display_errors",0);
|
|
if(isset($_FILES['file']['name']))
|
|
{
|
|
//Get the file
|
|
$InFile = file_get_contents($_FILES['file']['tmp_name']);
|
|
//sending
|
|
header('Content-Type: application/octet-stream');
|
|
header('Content-Disposition: attachment;filename='.substr($_FILES['file']['name'],0,-4).'.g1r');
|
|
header('Cache-Control: max-age=0');
|
|
$fh = fopen('php://output', 'wb');
|
|
fwrite($fh, $InFile);
|
|
fclose($fh);
|
|
}
|
|
else
|
|
{
|
|
header("Location: ../");
|
|
}
|
|
?>
|