repat/limonte-spam-link-analyser

Check probability of link is spam

0.2 2019-08-27 17:10 UTC

This package is auto-updated.

Last update: 2024-11-28 06:15:41 UTC


README

Build Status Scrutinizer Code Quality Code Coverage

Update:

The underlying paquettg/php-html-parser in ^1.7 wasn't PHP 7.3 ready so I forked the project, updated the dependency and reuploaded it.

Installation:

composer require repat/limonte-spam-link-analyser

Usage:

$spamLinkAnalyser = new Limonte\SpamLinkAnalyser;

$status = $spamLinkAnalyser->check($url);

if ($status === SpamLinkAnalyser::OK) {
    // link is OK
} else {
    // link is suspicious
}

if ($status === SpamLinkAnalyser::GOOGLE_BOT_DIFFERENT_REDIRECT) {
    // link has different redirect locations for browser and for Google Bot
}

if ($status === SpamLinkAnalyser::TOO_MUCH_REDIRECTS) {
    // link has 3 or more redirects
}

Related libraries: