Hi emopoops,
This'll give you what you need.
PHP Code:
<?PHP
// PHP function that does the work
function check_username($input){
$input = strtolower($input);
$file_handle = fopen("filename.txt", "rb");
while (!feof($file_handle)) {
$line_of_text = fgets($file_handle);
$parts = explode(' ', $line_of_text);
foreach($parts as $value){
$value = strtolower($value);
if($input == $value){
return 0;
}
}
}
return 1;
fclose($file_handle);
}
//Example of use
$username = "One";
$result = check_username($username);
if($result == 0){
echo 'Username not allowed';
}
else{
echo 'Username accepted';
}
?>
Obviously you can build this into your current username functions.