Skip to the content.

BlackSwan — Upload File from URL to Web Server

A single-file PHP utility that pulls any file from a remote URL straight onto your web server, with live progress, MITM relay mode, optional archive extraction, a built-in WordPress installer, file browser, PHP CLI support, and a one-click self-destruct.

Screenshot of the upload.php interface showing the upload form, progress bar, and file browser popup.

Latest release: v2.4.0 · 2026-05-03
Single file: upload.php — drop it in, run it, delete it.
Zero dependencies: pure PHP, vanilla JS, vanilla CSS. No Composer, no CDN, no build step.


Why this exists

Sometimes you need to get a file onto a server but wget and ssh aren’t available — shared hosting, locked-down cPanel, DirectAdmin, a managed WordPress host. You have FTP and a URL. That’s it.

upload.php bridges the gap: upload this one file, point it at any URL, and the server pulls the file directly. No more “download to laptop → upload via FTP” detours for a 2 GB archive.

Features

Requirements

Installation (Web)

  1. Download upload.php.
  2. Upload it via FTP/SFTP/cPanel File Manager to your target directory.
  3. Open it in your browser: https://yoursite.com/upload.php.
  4. Paste the source URL, set the destination filename and (optionally) a subfolder.
  5. Toggle “Extract archive” or “WordPress installer” if you need them.
  6. Click Upload File and watch the progress bar.
  7. When done, click “Self Destruct” to remove the script.

PHP CLI Usage

php upload.php --url=<URL> --name=<filename> [options]

Options:
  --url=<URL>        Source URL to download  (required)
  --name=<filename>  Destination filename     (required)
  --folder=<dir>     Sub-directory            (optional)
  --extract          Extract archive after download
  --wpinstall        WordPress installer mode
  --delete           Self-destruct (removes upload.php)
  --mitm=<URL>       MITM server upload.php URL (required for MITM mode)
  --mitm-keep        Keep file on MITM server after transfer
  --help             Show help

Examples

# WordPress install
php upload.php --url=https://wordpress.org/latest.zip --name=wp.zip --wpinstall

# Extract archive to subdirectory
php upload.php --url=https://example.com/app.zip --name=app.zip --folder=downloads --extract

# Download a file
php upload.php --url=https://example.com/file.tar.gz --name=archive.tar.gz --extract

# MITM relay — route through a proxy server
php upload.php --mitm=https://turkey.example.com/upload.php --url=https://iran.example.com/file.zip --name=file.zip

URL endpoints

URL Action
upload.php Main upload form.
upload.php?phpinfo=1 Full native phpinfo() in new tab.
upload.php?delete=true Self-destruct — deletes the script.
upload.php?r=… Cache-busting reload of the form.
upload.php (_a=fetch) MITM API: fetch a URL to this server and return JSON with file URL.
upload.php (_a=del_by_name) MITM API: delete a file by name/folder from this server.

Usage tips

⚠️ Security notes

This tool is intentionally permissive — it is designed to be uploaded, used, and immediately deleted. Treat it as a temporary utility, not as part of your application.

Changelog

Full history: CHANGELOG.md.

Recent highlights:

Contributing

Pull requests are welcome.

  1. Fork the repo.
  2. Branch off main.
  3. Keep the file count low — this project is a single file. New features land inside upload.php.
  4. Update CHANGELOG.md under a new version section.
  5. Open a PR with a clear description and (if UI changes) a screenshot.

License

MIT — see LICENSE.

Disclaimer

Provided as-is. The author accepts no responsibility for misuse, lost data, or security incidents resulting from leaving this script accessible on a production server. Self-destruct it the moment you’re done.