aboutsummaryrefslogtreecommitdiffstats
path: root/upload.php
diff options
context:
space:
mode:
Diffstat (limited to 'upload.php')
-rw-r--r--upload.php23
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";
+
+?>