![]() |
|
#1
|
|||
|
|||
Word CounterI am trying to create an efficient word counter in the box that is more or less fool proof. For instance, where people can't just keep pressing return to add extra words, or fool the space delimited nature of the counter by putting infinite number of spaces with no actual words. This is what I have so far, this system is totally fallible at the moment.
PHP Code:
The symbols array does not seem to work. If someone where to type: This is a test: message. It only counts the first 4 words, but it supposed to str_replace ":" with a space. Obviously that part doesn't work either... My major concern is getting an accurate count in the box without fooling it or exploiting it, and also being able to count lines separated by other punctuations (: , ; .), as in that top example should return 5 words, not 4. Can anyone offer some advice on this topic? |
|
#2
|
|||
|
|||
Re: Word CounterNevermind...I got it to work, even got a javascript active counter to work. But now I have another problem. I'll refer this to a different post.
|
|
#3
|
||||
|
||||
Re: Word CounterSorry I didn't reply sooner fallen_samurai, but I have been busy.
I had something like this written a long, LONG time ago but I never used it (it was meant for gidsearch.com). It may not be exactly what you were looking for but I hope it helps you in some small way if you decide to rewrite the script. PHP Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
Last Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Finding a word in a 2d grid | The_Kingpin | C Programming Language | 4 | 24-Feb-2005 19:53 |
| won't read file from disk, dunno why | wbsquared03 | C++ Forum | 3 | 29-Nov-2004 11:19 |
| How to do word comparison in C++ ? | mail_as | C++ Forum | 19 | 22-Jun-2004 17:39 |
| testing word file "need help" | alexandro | C Programming Language | 2 | 03-Jun-2004 14:38 |
| coding a word with a givin factor | funnyf | C++ Forum | 2 | 13-Jan-2004 08:32 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The