PHP Classes

What is the best PHP count characters class?: Get number of characters in a uploaded doc, txt, odt, pdf etc

Recommend this page to a friend!
  All requests RSS feed  >  What is the best PHP count characters...  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

What is the best PHP count characters class?

Edit

Picture of Corentin Facélina by Corentin Facélina - 8 years ago (2015-07-20)

Get number of characters in a uploaded doc, txt, odt, pdf etc

This request is clear and relevant.
This request is not clear or is not relevant.

+4

I need to know how many characters contains a file uploaded via my page.

So the file is uploaded on a ftp server. From there I don't know how to get that number of characters to show on the page and I also need to keep it stored.

Anyway the file could be in any of the usual document format. PDF DOC TXT ODT etc... thank you for helping that's a huge project and coding is not my area.

Ask clarification

1 Recommendation

PHP DOC DOCX PDF to Text Converter: Convert DOCX, DOC, PDF to plain text

This recommendation solves the problem.
This recommendation does not solve the problem.

+2

Picture of Manuel Lemos by Manuel Lemos Reputation 23325 - 8 years ago (2015-07-20) Comment

This class can extract the text from files of at least some of the formats you want to support.

Once you extract the text it is easy to count the number of characters. You can strip spaces if you want to not consider the spaces.

If the file in encoded in UTF-8 or other encodings that some characters may take more than one byte, it is also possible to make the character count correctly with mb_strlen function for instance.


Recommend package
: 
: