Spell Checking and URL Tricks
ForceType
ForceType application/x-httpd-php3
')?>
PATH_INFO
Simple Spell-Checker
Simple Spell-Checker
$aspell_link=aspell_new( "english");
$word = substr($PATH_INFO,1); /* strip away first / */
if (aspell_check($aspell_link,$word)) {
echo "Correct spelling of \'$word\'\n";
} else {
echo "Incorrect spelling of \'$word\'
\n";
}
echo "Possible correct spellings include:
\n";
$suggestions=aspell_suggest($aspell_link,$word);
for($i=0; $i < count($suggestions); $i++) {
echo "
" . $suggestions[$i] . "
";
}
echo "";
?>