Description
Single PHP File Host is a minimal file host that runs from one PHP script, index.php. You upload a file with a plain HTTP POST, for example with curl and its -F option, and the script stores it under a random name that keeps the original extension. It is meant to behave like a pastebin or a 0x0 style host. Serving the stored files is left to your web server, so the script does not send them back itself. All settings are global variables at the top of index.php. For larger uploads you also need to raise upload_max_filesize, post_max_size, max_input_time and max_execution_time in php.ini, and the script prints a warning if they are set too small. A purge mode removes files that have passed their maximum age; you run it with a command-line argument from a cron job. The age limit follows an exponential decay curve, so small files are kept longer than large ones, and a DECAY_EXP setting controls the curve. The README includes Apache and Nginx examples. The source is public on GitHub.…
Highlights
- Upload with curl or any HTTP POST
- Random file names that keep their extensions
- Purge old files from a cron job
- Size-based retention curve
- Apache and Nginx configuration examples
Ratings & Reviews
No ratings yet
Be the first to rate Single PHP Filehost.
People also visit
Single PHP Filehost FAQ
What is it for?
Hosting small uploaded files on your own web server, in the way a pastebin or a 0x0 style host works.
How do I upload a file?
Send it as a multipart form field named file to the URL where the script is hosted. The README shows a curl example.
How are old files removed?
Run the script with the purge argument, usually from a cron job. Files are removed once they pass their maximum age, which depends on their size.
What do I need to run it?
A web server with PHP. Raise the upload limits in php.ini for larger files, and configure the web server as the README shows for Apache or Nginx.
What are the best Single PHP Filehost alternatives?
Popular alternatives to Single PHP Filehost include rustypaste, file.io and Tinyfilemanager. See all Single PHP Filehost alternatives
