13 lines
340 B
PHP
13 lines
340 B
PHP
|
<?php
|
||
|
|
||
|
require_once 'functions.php';
|
||
|
|
||
|
if (hasValidGetDatas()) {
|
||
|
header("Content-disposition: attachment; filename=".$_GET['code'].'.'.(($_GET['extension']) ? slugify($_GET['extension']) : 'txt'));
|
||
|
header("Content-Type: application/force-download");
|
||
|
readfile('datas/sources/'.$_GET['code']);
|
||
|
die();
|
||
|
}
|
||
|
|
||
|
header('Location: /');
|