Recommend this page to a friend! | Stumble It! | Bookmark in del.icio.us |
All requests | > | What is the best PHP count characters class? | > | Request new recommendation | > | Featured requests | > | No recommendations | ||
by Corentin Facélina - 6 months ago (2015-07-20) count characters
+3 | 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. |
+2 | by Manuel Lemos 11100 - 6 months 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 | |
|