$fileName = str_replace("/index.php/", "", $_SERVER["REQUEST_URI"]);
$filePath = "/path/" . $fileName;
$url = "https://dl.dropboxusercontent.com/1/view/" . $fileName;
$file = file_get_contents($url);
if($file){
file_put_contents($filePath, $file);
}