Results 1 to 2 of 2
Mar 29, 2010, 20:18 #1
Where to Store a Word List (TXT or MySQL)
I have a word game and I use a word list to validate each word entered.
Currently words are in a TXT file (around 500KB).
A PHP script reads the file (with file_get_contents) and validates (with strpos) the word built by the player.
Now the game is getting more and more (but not huge) traffic each day and this approach started to cause memory issues on the (shared) server.
I guess web servers do some caching for frequently opened files and also PHP does the same for frequently used scripts but those did not help in this situation.
Anyway I thought porting the word list to a MySQL database and validate using queries might be a lot better solution. Is that right?
Mar 29, 2010, 20:58 #2
- Join Date
- Jul 2002
- Toronto, Canada
- 58 Post(s)
- 3 Thread(s)