PHP code example of hocvt / tika-simple

1. Go to this page and download the library: Download hocvt/tika-simple 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/ */

    

hocvt / tika-simple example snippets





$client = new \HocVT\TikaSimple\TikaSimpleClient();

$file = __DIR__ . "/demo.docx";

$mime = $client->mimeFile($file);

echo "Tika version " . $client->version() . "\n";

var_dump($mime);

$html = $client->rmetaFile($file, 'html');

var_dump($html);