PHP code example of yupmin / php-chardet
1. Go to this page and download the library: Download yupmin/php-chardet library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yupmin / php-chardet example snippets
//...
use Yupmin\PHPChardet\Chardet;
//...
$chardet = new Chardet();
$chardetContainer = $chardet->analyze('test.txt');
$filePath = $chardetContainer->getFilePath();
$charset = $chardetContainer->getCharset();
$confidence = $chardetContainer->getConfidence();
//...
bash
composer