We can find duplicate words in a string through Wordstats() in PHP.In following code , first i have compressed multiple spaces into string and then decomposed the sentence into words with explode()
PHP Archive

The Apache HTTP Server is a powerful and flexible HTTP/1.1 compliant web server. Originally designed as a replacement for the NCSA HTTP Server, it has grown to be the most popular web server on the Internet. As a project of the Apache Software Foundation, the developers aim to collaboratively develop and maintain a robust, commercial-grade, standards-based server with freely available source code