diff options
author | Alex Vitkov <alexvitkov98@gmail.com> | 2020-12-03 21:10:17 +0200 |
---|---|---|
committer | Alex Vitkov <alexvitkov98@gmail.com> | 2020-12-03 21:10:17 +0200 |
commit | 6c745ea0f54e660577d070b2ddaf4977039a094a (patch) | |
tree | e3938f21c98f7f459bc2589989d9e7f4c25d2950 /upload.php | |
download | fileup-6c745ea0f54e660577d070b2ddaf4977039a094a.tar.gz |
initial
Diffstat (limited to 'upload.php')
-rw-r--r-- | upload.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/upload.php b/upload.php new file mode 100644 index 0000000..93fa778 --- /dev/null +++ b/upload.php @@ -0,0 +1,23 @@ +<?php + +if (!array_key_exists('uf', $_FILES)) { + http_response_code(400); + exit(); +} + + +$file = $_FILES['uf']; + + +if (file['error'] != 0) { + http_response_code(400); + exit(); +} + +$m = md5_file($file['tmp_name']); + +copy($file['tmp_name'], "screen/$m.png"); + +echo "http://india.fmi.fail/screen/$m.png"; + +?> |