mirror of
https://github.com/Chouchen/ShikiProxy.git
synced 2018-06-07 06:24:38 +02:00
Creation of the world
This commit is contained in:
22
download.php
Normal file
22
download.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
if(isset($_POST['url']) && isset($_POST['method'])){
|
||||
|
||||
$file2zip = new FileToZip(filter_input(INPUT_POST, 'url', FILTER_VALIDATE_URL));
|
||||
|
||||
$method = filter_has_var(INPUT_POST, 'method') ? is_array($_POST['method']) ? $_POST['method'] : array($_POST['method']) : null;
|
||||
|
||||
$fileDispatcher = new FileToZipDispatcher($method, $file2zip->build());
|
||||
|
||||
$options = $_REQUEST;
|
||||
unset($options['method']);
|
||||
unset($options['url']);
|
||||
|
||||
$fileDispatcher->dispatch($options);
|
||||
|
||||
if(!in_array('toDownloadNow', $method)){
|
||||
header('Location: '.BASE_URL);
|
||||
exit;
|
||||
}
|
||||
}else{
|
||||
header('Location: '.BASE_URL);
|
||||
}
|
Reference in New Issue
Block a user