PHP Classes

PHP AJAX Character Counter: Count characters in a text input using AJAX

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 72 All time: 10,241 This week: 69Up
Version License PHP version Categories
ajax-character-count 1.0.0GNU General Publi...5PHP 5, Text processing, AJAX
Description 

Author

This package can count characters in a text input using AJAX.

It provides an example page with a text input that uses a JavaScript script to send an AJAX request to the server using jQuery to call a script that gets statistics about the text entered by the user in the text input.

The package also provides a PHP script that takes the text passed to the server using the AJAX request and outputs a message that shows several types of statistics about that text.

Currently, it can return:

- Characters with spaces

- Characters without spaces

- Number of spaces

- Number of words

- Number of phrases

- Estimated number of minutes to read the text

Innovation Award
PHP Programming Innovation award nominee
October 2023
Number 4
Many sites use text inputs to let users enter text that will be used for publication.

Some publications limit the amount of text the users can enter so it does not take too long for others to read.

This package provides examples of HTML, JavaScript, and PHP to demonstrate how developers can implement a character counter tool that can be displayed next to a text input to show several types of statistics about the text entered by the users, like the current character count and the estimated time that other people will take to read the text.

Manuel Lemos
Picture of Pierre-Henry Soria
  Performance   Level  
Name: Pierre-Henry Soria <contact>
Classes: 49 packages by
Country: United Kingdom
Innovation award
Innovation award
Nominee: 18x

Winner: 3x

Details

PHP Ajax Character Counter

Description

PHP Character Counter Online Tool is a PHP script tool allows visitors to count letters/characters, words, sentences/phrases, spaces, etc. in live. It even allows to analyze the text and calculate the reading time in real-time.

Author

Pierre-Henry Soria

Contact

You can contact me at: ph7software [at] gmail.com

License

This script is under General Public License 3 or later; See the LICENSE.txt file


  Files folder image Files (7)  
File Role Description
Files folder imageinc (1 file)
Accessible without login Plain text file ajax.js Data Auxiliary data
Accessible without login Plain text file ajax.php Aux. Auxiliary script
Accessible without login HTML file index.html Data Example form page
Accessible without login Plain text file license.txt Doc. Documentation
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file style.css Data Auxiliary data

  Files folder image Files (7)  /  inc  
File Role Description
  Accessible without login Plain text file functions.php Aux. Auxiliary script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:72
This week:0
All time:10,241
This week:69Up