Scrabble cheater

So I've created a script which takes some user input, and lets them search for all of the words in either the TWL06 or SOWPODS dictionary for words which match their input.

Some features:

1. The order that the user enters the letters doesn't matter.
2. The user can specify the exact location of some of the letters in the word
3. The user can use up to two wildcards in the letters (to represent blanks).

I'd like to try some ways to minimize the memory required to do this, it's possible that I need to read each line of the file at a time, and close the file after I've done so, so that I can search through a larger file (there are 2 other dictionaries I'd like to include, but they push PHP over the limit in terms of memory).

Check out my Scrabble cheater here.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.