aboutsummaryrefslogtreecommitdiffstats
path: root/php/upload.php
blob: d9110c73dccfd5d3b171a866858e7f7ee2a1614c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?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";

?>