PHP code example of visavi / librator

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

    

visavi / librator example snippets



// Connect class
 library.txt
$librator = new Visavi\Librator('library.txt');

// The number of output lines
$librator->read(20);

// Or split the file by the number of words
$librator->read(300, 'words');

// Or split the file by the number of characters
$librator->read(2000, 'chars');

// Get current page
$librator->currentPage();

// Automatic output of the header text from the first row
$librator->getTitle();