<html>
<head>
<title>PHP Security tests made by Faxe</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<rcp> <p id="rcorners1">Upload the security file</p> </rcp>
<form action="bedre.php" method="post" enctype="multipart/form-data">
<fpos2> <input type="file" name="file_upload"> </fpos2>
<fpos> <input type="submit" class="btn" value="Submit"> </fpos>
<?php
if(isset($_POST['Submit'])) {
$fname = $_FILES['file_upload']['tmp_name'];
$fcontent = file_get_contents($fname);
if ($fname == "123.txt") {
echo "File found";
if ($fcontent == "99393") {
echo "Success you have the security file";
} else {
echo "Security code not found";
}
} else {
echo "Security File Was Not Correct";
}
}
?>
</form>
</div>
</body>
</html>