This Google did-you-mean script uses the mobil version of google to get suggested words. This might not be appreciated by google and it is the responsibility by the user to acquire any necessary permissions to use the script, provided as is.
- Put the GoogleDidYouMean.php in your source folder and include the file in your project.
- Instantiate new GoogleDidYouMean().
- Call doSpellingSuggestion($phrase, $lang).
- Put all files in your plugins directory.
- Activate the plugin in wordpress.
- Include following code anywhere you want to use google did you mean (example on the search result when no result was found).
function doSpellingSuggestion($phrase, $lang)
$phrase - urlencoded phrase to lookup
$lang - optional, supports "sv" for Swedish otherwise English