PHP code example of oliverschloebe / google-spell-pspell

1. Go to this page and download the library: Download oliverschloebe/google-spell-pspell library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

oliverschloebe / google-spell-pspell example snippets



$content = "";
$options = array(
	"lang"				=> 'en',
	"maxSuggestions"		=> 10,
	"customDict"			=> 0,
	"charset"			=> 'utf-8'
);
$factory = new SpellChecker($options);

$spell = $factory->create(trim("Ths is a tst"));

header('Content-Type: text/xml; charset=UTF-8');
echo $spell->toXML();