prostoroman/page-analyzer

Calculate frequency of words for html content for SEO

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/prostoroman/page-analyzer

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

This package is not auto-updated.

Last update: 2025-10-12 09:16:16 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!