I would like to know how can I read the contents of a doc or docx. I\'m using a Linux VPS and PHP, but if there is a simpler solution using other language, please let me kno
You can use Apache Tika as complete solution it provides REST API.
Another good library is RawText, as it can do an OCR over images, and extract text from any doc. It's non-free, and it works over REST API.
The sample code extracting your file with RawText:
$result = $rawText->extract($your_file)