Sorry if there are plenty of answers to this, but I tried EVERY Answer. I have a website (http://grmpixelmon.co/hwidreplace.html) there is the HWID Label where to input the HWID to replace in the text file (HWIDs.txt) but it keep giving me error 500.. here is the code I tried
<?php
// See the password_hash() example to see where this came from.
$hwid = $_POST['hwid'];
$FILE = "HWIDs.txt";
$replace = $_POST['replace'];
$replace_with = " ";
$password = $_POST['password'];
$password2 = 'mypassword';
if ($password2 === $password) {
if ( empty ($hwid) ){
echo 'you did not enter an hwid';
}else{
file_put_contents("HWIDs.txt", $hwid, FILE_APPEND);
echo 'Succesfully added ';
echo $hwid;
echo ' as hwid';
}
$data = file_get_contents("HWIDs.txt");
$newdata = str_replace($replace, $replace_with, $data);
file_put_contents("HWIDs.txt", $newdata);
}
}
} else {
echo 'Invalid password.';
}
?>