Cập nhật ngày 13/05/2022
<?php if (isset($_POST['url'])) { $file = $_POST['url']; $name = basename($file); if (copy($file, $name) == true) { $size = filesize($name); $fp = fopen($name, 'rb'); header("Content-type: application/octet-stream"); header("Content-length:$size"); header('Content-disposition: attachment; filename="' . str_replace(['.jar', '%20', ' '], ['_jar', '-', '-'], $name) . '"'); fpassthru($fp); fclose($fp); unlink($name); } else { echo 'Bạn không thể đổi tên tập tin này sang _jar, có thể nó đã bị lỗi'; } } else { echo '<center>GET LINK _JAR</center> <form method="post"> <input type="text" name="url" value="http://" placeholder="Enter a .JAR url" /> <button type="submit">Lấy link</button> </form>'; }