PHP code example of effective-soft / intellexer-php

1. Go to this page and download the library: Download effective-soft/intellexer-php 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/ */

    

effective-soft / intellexer-php example snippets



ellexerClient = new \EffectiveSoft\Intellexer\IntellexerClient('YOUR_API_KEY');

$linguisticProcessor = new \EffectiveSoft\Intellexer\LinguisticProcessor($intellexerClient);
$url = 'https://www.intellexer.com/';
var_dump($linguisticProcessor->analyzeText(file_get_contents($url)));


File = sprintf('%s/%s.log', sys_get_temp_dir() . DIRECTORY_SEPARATOR, 'intellexer_api');
$logger = new \Monolog\Logger('intellexerApi');
$logger->pushHandler(
    new \Monolog\Handler\StreamHandler(
        $logFile,
        \Monolog\Logger::DEBUG,
        null,
        0777
    )
);
$intellexerClient = new \EffectiveSoft\Intellexer\IntellexerClient('YOUR_API_KEY');
$intellexerClient->setLogger($logger);
$linguisticProcessor = new \EffectiveSoft\Intellexer\LinguisticProcessor($intellexerClient);
$url = 'https://www.intellexer.com/';
var_dump($linguisticProcessor->analyzeText(file_get_contents($url)));
var_dump(file_get_contents($logFile));

composer