repat / limonte-spam-link-analyser
Check probability of link is spam
0.2
2019-08-27 17:10 UTC
Requires
- ext-curl: *
- paquettg/php-html-parser: ^2.1
Requires (Dev)
- phpunit/phpunit: ~5.2
This package is auto-updated.
Last update: 2024-11-28 06:15:41 UTC
README
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:
- Google Safebrowsing PHP library: limonte/google-safebrowsing
- McAfee SiteAdvisor PHP library: limonte/mcafee-siteadvisor
- PHP parser for Adblock Plus filters: limonte/php-adblock-parser