This project ranks the frequency of words in a text file in order descending order,that is, from words appearing the most to the least. It is written in pure PHP.
Simply upload your files in the docs folder and have the first file named one.txt . The other file names don't matter.
The code is divided in two segments. The first segment only reads the first file - one.txt - and ranks all the words indicating the number of appearances.
The second segment reads through all the files and outputs the total ranks in order of number of appearances of all the words from all the files in the docs directory.
The output has been limited to 100 to for easy readability when large text files are used.