If you can get a dictionary from somewhere ( you might check The Gutenburg Project, they have freely available machine-readable books over there, and I know they have a dictionary, you'll just need to parse it up into files... ) then you can get a list of real words.
Then you could just check the words people typed in against the words in the dictionary.
To be able to guess at words, use something like metaphone() or soundex() ( www.php.net/soundex www.php.net/metaphone )
There are other options too, often times a combination of soundex and metaphone ( and metaphone 2 is available too I think, although not built in to PHP ) and other functions like levenshtein() and similar_text() can give you the best results.