I've got this script for uploading an image to my own website using ShareX, I have it hosted on 000webhost because I have no disposable income to waste on webhosting for personal stuff.
<?php
header("Content-Type: text/text");
$key = "...";
$uploadhost = "http://quietess.xyz/";
$redirect = "http://quietess.xyz/";
if (isset($_POST['k'])) {
if ($_POST['k'] == $key) {
$target = getcwd() . "/" . basename($_FILES['d']['name']);
if (move_uploaded_file($_FILES['d']['tmp_name'], $target)) {
$md5 = md5_file(getcwd() . "/" . basename($_FILES['d']['name']));
rename(getcwd() . "/" . basename($_FILES['d']['name']), getcwd() . "/i/" . $md5 . "." . end(explode(".", $_FILES["d"]["name"])));
echo $uploadhost . "i/" . $md5 . "." . end(explode(".", $_FILES["d"]["name"]));
} else {
echo "Sorry, there was a problem uploading your file.";
}
} else {
header('Location: '.$redirect);
}
} else {
header('Location: '.$redirect);
}
?>
And this is what my ShareX custom settings look like
It works very well, but then I have a problem when it comes to my webhosting...
It echos the link back like this (which is put in my clipboard for easy copy and pasting)
http://quietess.xyz/i/b7f7fdc250298436af47afefc774d02e.png
<!-- Hosting24 Analytics Code -->
<script type="text/javascript" src="http://stats.hosting24.com/count.php"></script>
<!-- End Of Analytics Code -->
Is there any way to make it stop putting the Analytics code at the end like that?
Couldn't find an answer using code, but finally got an answer on their forums after about a day. There's a spot on their site (completely hidden, apparently) to disable analytics.