Skip to content

Instantly share code, notes, and snippets.

View Venipa's full-sized avatar
:shipit:
Working from home

Venipa

:shipit:
Working from home
View GitHub Profile
@Venipa
Venipa / upload.php
Last active June 9, 2017 16:55
Simple File Upload
<?php
$target_dir = "uploads/".date("Y-m-d");
if(!file_exists($target_dir)) {
mkdir($target_dir);
}
$maxfilesize = 200; //MB
$filetype = ".".pathinfo($_FILES["files"]["name"], PATHINFO_EXTENSION);
$target_file = $target_dir . "/[" . date("h.m.s") . "]" . random_str(2) . "_" . $_FILES["files"]["name"];
$key = "Qvnpk7wVaYqHDEqkSCw31YWUd7bmNVaJbwsokX9aqzGDlhMb4a";
$postkey = isset($_POST["key"]) ? stripslashes(trim($_POST["key"])) : null;
Copyright (c) 2016 Venipa
Simple you bought it you can use it.
No sharing of the product.