I wrote a file upload script via PHP and now i have a problem that i can't upload bigger files around 8-10 MB so do you guys have any suggestions ?
<?php
ini_set('post_max_size', '8128M');
ini_set('upload_max_filesize', '8128M');
header("Content-Type: text/plain");
$key = "M8hqvvaCbMGXP4GycfDNc6CUckYdETdPEkcdKu9QaUEM52jCZnrnrKkh8B9hVZGN";
$uploadhost = "https://i.sandrotracker.biz/";
$foldername = "../";
if ($_SERVER["REQUEST_URI"] == "/robot.txt") { die("User-agent: *\nDisallow: /"); }
if (isset($_POST['k'])) {
if ($_POST['k'] == $key) {
$target = getcwd() . "/" . $foldername . "/" . basename(basename($_FILES['d']['name']));
if (move_uploaded_file($_FILES['d']['tmp_name'], $target)) {
$md5 = md5(microtime(true) . md5_file(getcwd() . "/" . $foldername . "/" . basename($_FILES['d']['name'])));
rename(getcwd() . "/" . $foldername . "/" . basename($_FILES['d']
['name']), getcwd() . "/" . $foldername . "/" . $md5 . "." .
end(explode(".",
$_FILES["d"]["name"])));
echo $uploadhost . $md5 . "." . end(explode(".", $_FILES["d"]
["name"]));
exit;
} else {
print_r($_FILES);
exit;
}
}
}
echo "invalid_request";
?>