title: How to count words from .doc file using php script?
body: <p>I have tried many things like <a href="https://stackoverflow.com/questions/19503653/how-to-extract-text-from-word-file-doc-docx-xlsx-pptx-php">How to extract text from word file .doc,docx,.xlsx,.pptx php</a>.
  But this isn't a solution.</p>
  
  <p>My server is Linux based so enabling <strong>extension=php_com_dotnet.dll</strong> is not the solution.</p>
  
  <p>Another solution was installing LIBRE office on server and converting the .doc file to .txt on the fly and then counting the words from that file. This is very tedious job and time consuming.</p>
  
  <p>I just need a simple php script that removes the special characters from the .doc file and count the number of words.</p>