word list

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dillion
Forum Commoner
Posts: 56
Joined: Thu Feb 15, 2007 8:32 am

word list

Post by dillion »

I am thinking of writing a basic word game using PHP and mySQL but for it to work effectively, I would need to use a central dictionary file (either a basic words list file download or to an free online service).

So basically you type a word in a text field then before you are given a score, the script would check for whether the word exists or spelled correctly.

I have googled everywhere for this file without success - maybe I was using the wrong search terms but if you have any ideas, it would be greatly appreciated. :)
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

What is it you're looking for - a list of words?
Or a way to check for an existing word in a list of words with PHP?
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

You can use pspell to check spelling. To use it you need to have apell on your machine. You should be able to build/use a word list from the library.
dillion
Forum Commoner
Posts: 56
Joined: Thu Feb 15, 2007 8:32 am

Post by dillion »

thanks guys, for your responses and the links.

That's right I am looking to have a basic list of (valid) words in XML, flatfile, or mySQL so when the person who types in a word, the word checked against the database. I will only be using PHP and mySQL - I know how to do comparisons, etc. :)

Unfortunately, the "game" will be based on a shared server so installing any third party components is out of question. :(

EDIT: similar to postcodeanywhere or postcode look-up.
dillion
Forum Commoner
Posts: 56
Joined: Thu Feb 15, 2007 8:32 am

Post by dillion »

just a quick note to say that I finally found a word list file! There are 5 or 6 separate files and each word is separated by a line.

I am wondering if it is better to add these to mySQL for performance reasons or....?
Post Reply