prostoroman/page-analyzer

There is no license information available for the latest version (dev-master) of this package.

Calculate frequency of words for html content for SEO

dev-master 2017-07-18 04:13 UTC

This package is not auto-updated.

Last update: 2024-04-28 01:08:50 UTC


README

Calculate frequency of words in html content (input string, file or URL).

$analyzer = new PageAnalyzer\Analyzer();
$stats = $analyzer->analyse('http://www.lipsum.com/');
var_dump($stats);

Options

Example, how to ignore content in noindex, exclude stop words from analysis and check presence in particular tags used by search engine algorythms in rankinkg.

$options = [
  'ignoreNoindex' => true,
  'stopWords' => ['в', 'и', 'от', 'для'],
  'checkTags' => ['title', 'keywords', 'description', 'a', 'b,strong', 'h1,h2,h3,h4,h5,h6']
];
$analyzer = new PageAnalyzer\Analyzer(['stopWords' => $stopWords]);
var_dump($stats);

Please check: the demo here

Would appreciate any contributions. Thank you!