You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
-
# **Upload File from URL to Web Server v.13**
1
+
# **Upload File from URL to Web Server v.14**
2
2
3
3

4
+

4
5
5
6
A simple and efficient solution for uploading files directly from a URL to your web server (e.g., CPanel). This tool is perfect for quick tasks where you need to download and store files on your hosting environment with minimal effort.
6
7
7
-
**Latest Publish Date:**2024/08/18 (1403/05/28)
8
+
**Latest Publish Date:**2025-01-08 | 1403-10-19
8
9
9
10
## Features
10
11
12
+
-**WordPress-Ready:** Upload Latest WordPress and UnZip its archive and move content to root.
11
13
-**One-Click Upload:** Effortlessly upload files from a URL to your hosting storage.
12
14
-**Self-Destruct Feature:** The script can self-destruct after use, enhancing security.
13
15
-**Auto File-Name Filler:** Automatically suggests a file name based on the URL.
@@ -45,13 +47,15 @@ This tool is provided as-is, and is intended for personal use only. The author t
45
47
46
48
## Changelog:
47
49
50
+
- Version 14: Added WordPress-Ready mode, UnZip Archive and move its content to root
51
+
- Version 14: Added Self Destruct link to finish screen after upload done
48
52
- Version 13: Added Self Destruct feature
49
-
- Version 12: Added New features and stability.
53
+
- Version 12: Added New features and stability
50
54
- Version 08: Added Compatibility with NON-SSL and DirectAdmin hosting
51
55
- Version 07: Added Auto file-name filler and Back to Root button
52
56
- Version 06: Added Timer, showing elapsed and total time
53
57
- Version 05: More stability on large files processing
54
58
- Version 04: Fixed get file size error
55
59
- Version 03: Added Some styling and visuals
56
60
- Version 02: Added Real-time progress while uploading
57
-
- Version 01: Initiate release, at 2020/11/15 - 1399/08/25
61
+
- Version 01: Initiate release, at 2020/11/15 - 1399/08/25
echo"<script>document.querySelector('h1').innerHTML += '<div style=\"margin-bottom: 0.5rem;\"><small style=\"font-size: 1rem;\">⛔️ Error: Failed to extract ZIP file ({$local}).</small></div>';</script>";
234
+
ob_end_flush(); ob_flush(); flush(); ob_start();
235
+
}
236
+
if ($continue) {
237
+
238
+
if (!is_dir($tempDir)) {
239
+
echo"<script>document.querySelector('h1').innerHTML += '<div style=\"margin-bottom: 0.5rem;\"><small style=\"font-size: 1rem;\">⛔️ Error: 'wordpress' folder not found in the ZIP file.</small></div>';</script>";
240
+
ob_end_flush(); ob_flush(); flush(); ob_start();
241
+
}
242
+
// Step 3: Move files from the 'wordpress' folder to the root directory
243
+
$files = scandir($tempDir); $jf = 0; $jfl = 0;
244
+
foreach ($filesas$file) {
245
+
if ($file !== '.' && $file !== '..') {
246
+
$source = $tempDir . '/' . $file;
247
+
$destination = $rootDir . '/' . $file;
248
+
// Move the file or directory
249
+
if (is_dir($source)) {
250
+
$jfl++; rename($source, $destination);
251
+
} else {
252
+
$jf++; rename($source, $destination);
253
+
}
254
+
}
255
+
}
256
+
echo"<script>document.querySelector('h1').innerHTML += '<div style=\"margin-bottom: 0.5rem;\"><small style=\"font-size: 1rem;\">✅ <strong>".number_format($jf)."</strong> Files & <strong>".number_format($jfl)."</strong> Folders moved successfully to the root directory.</small></div>';</script>";
0 commit comments