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

?>