PHPackages                             rvalitov/backlink-checker-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rvalitov/backlink-checker-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rvalitov/backlink-checker-php
=============================

Validates a predefined list of backlinks on remote websites that they exist and are correct (for SEO). Simple and Javascript-enabled web engines are used for scraping.

3.1.0(1y ago)6157920[6 PRs](https://github.com/rvalitov/backlink-checker-php/pulls)GPL-3.0-or-laterPHPPHP ^7.4.20 || ^8.0.7 || ^8.1 || ^8.2 || ^8.3 || ^8.4CI passing

Since Oct 13Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/rvalitov/backlink-checker-php)[ Packagist](https://packagist.org/packages/rvalitov/backlink-checker-php)[ Docs](https://github.com/rvalitov/backlink-checker-php)[ Fund](https://donations.walitoff.com)[ GitHub Sponsors](https://github.com/rvalitov)[ RSS](/packages/rvalitov-backlink-checker-php/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (10)Versions (16)Used By (0)

Backlink Validator for SEO
==========================

[](#backlink-validator-for-seo)

[![PHP version icon](https://camo.githubusercontent.com/89c4d4415750ff128d28c8e2ddcad9baed7dfc67eebbff9a4b8d0966fc54c50e/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d504850266d6573736167653d372e342532302d253230382e3425323026636f6c6f723d626c7565)](https://camo.githubusercontent.com/89c4d4415750ff128d28c8e2ddcad9baed7dfc67eebbff9a4b8d0966fc54c50e/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d504850266d6573736167653d372e342532302d253230382e3425323026636f6c6f723d626c7565)[![Platform icon](https://camo.githubusercontent.com/4ed29d2ad37ddb8e379a6fcd2b2896acf87200cc5a22df116af65b770f892564/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506c6174666f726d2d57696e646f77732532432532304c696e75782532432532304d61632d626c7565)](https://camo.githubusercontent.com/4ed29d2ad37ddb8e379a6fcd2b2896acf87200cc5a22df116af65b770f892564/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506c6174666f726d2d57696e646f77732532432532304c696e75782532432532304d61632d626c7565)[![Packagist Downloads](https://camo.githubusercontent.com/8c80dc095ba6e0afaf59f7d37aeb33cb6e61e19d92a269bf4b3843b9f3665879/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7276616c69746f762f6261636b6c696e6b2d636865636b65722d706870)](https://camo.githubusercontent.com/8c80dc095ba6e0afaf59f7d37aeb33cb6e61e19d92a269bf4b3843b9f3665879/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7276616c69746f762f6261636b6c696e6b2d636865636b65722d706870)[![Packagist Stars](https://camo.githubusercontent.com/42af0db141e2aa782addc55cba7067ab0e09ad6705db5174d10d201330b0fcc5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f7276616c69746f762f6261636b6c696e6b2d636865636b65722d706870)](https://camo.githubusercontent.com/42af0db141e2aa782addc55cba7067ab0e09ad6705db5174d10d201330b0fcc5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f7276616c69746f762f6261636b6c696e6b2d636865636b65722d706870)[![Codacy Badge](https://camo.githubusercontent.com/4a67b1f0243f665d22fc0fb3a5d30c08570f548a8151d70ca6043a58880f5401/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f3332386538656165396134393430393862386138656536366436303266373831)](https://app.codacy.com/gh/rvalitov/backlink-checker-php/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)[![Codacy Badge](https://camo.githubusercontent.com/27398389e46d81af2a0a08b3ac3d85069cff48436028555440dd42d244ea7ff1/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3332386538656165396134393430393862386138656536366436303266373831)](https://app.codacy.com/gh/rvalitov/backlink-checker-php/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)[![Code Smells](https://camo.githubusercontent.com/30b587b6b6db67d15afa625daa8d3e14a843fa88e39042ab8987bcb122282adf/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7276616c69746f765f6261636b6c696e6b2d636865636b65722d706870266d65747269633d636f64655f736d656c6c73)](https://sonarcloud.io/summary/new_code?id=rvalitov_backlink-checker-php)[![Maintainability Rating](https://camo.githubusercontent.com/f7b2909b4b9bca7ab2265f3348677c21e57318c7f1518c863407ab4edcde5d96/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7276616c69746f765f6261636b6c696e6b2d636865636b65722d706870266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/summary/new_code?id=rvalitov_backlink-checker-php)[![Security Rating](https://camo.githubusercontent.com/874f48d5e1843342c690e377c004cebe3d4f5d1adf58dfaf982e469dc85bf2ec/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7276616c69746f765f6261636b6c696e6b2d636865636b65722d706870266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/summary/new_code?id=rvalitov_backlink-checker-php)[![Bugs](https://camo.githubusercontent.com/a5533801b5a97fafc5d43635c0d64856ab20fa72f45c442ba8d12b783fe0f81b/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7276616c69746f765f6261636b6c696e6b2d636865636b65722d706870266d65747269633d62756773)](https://sonarcloud.io/summary/new_code?id=rvalitov_backlink-checker-php)[![Vulnerabilities](https://camo.githubusercontent.com/c2e42e96c9281bbd892bd473a133d216798af13989d8152961417c1bbde7be0c/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7276616c69746f765f6261636b6c696e6b2d636865636b65722d706870266d65747269633d76756c6e65726162696c6974696573)](https://sonarcloud.io/summary/new_code?id=rvalitov_backlink-checker-php)[![Reliability Rating](https://camo.githubusercontent.com/1c3c3817aa3f2d5013b91b589fbfa65a324d85db3800b7a4ddae260fab320ea5/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7276616c69746f765f6261636b6c696e6b2d636865636b65722d706870266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/summary/new_code?id=rvalitov_backlink-checker-php)[![Technical Debt](https://camo.githubusercontent.com/a560702dc1ed8806026cc5b4acdee56636eb1b0c0f1af0ad53e1369a79427e7a/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7276616c69746f765f6261636b6c696e6b2d636865636b65722d706870266d65747269633d7371616c655f696e646578)](https://sonarcloud.io/summary/new_code?id=rvalitov_backlink-checker-php)[![Tests](https://github.com/rvalitov/backlink-checker-php/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/rvalitov/backlink-checker-php/actions/workflows/tests.yml)[![GitHub License](https://camo.githubusercontent.com/e423eeb5cc81e08b5d33c1afa5b770890cb5a7d7ecf7229d8bbc02a518f238e5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7276616c69746f762f6261636b6c696e6b2d636865636b65722d7068703f636f6c6f723d626c7565)](https://camo.githubusercontent.com/e423eeb5cc81e08b5d33c1afa5b770890cb5a7d7ecf7229d8bbc02a518f238e5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7276616c69746f762f6261636b6c696e6b2d636865636b65722d7068703f636f6c6f723d626c7565)

[![Social preview](media/social-preview.jpg)](media/social-preview.jpg)

This project is a package for developers to validate backlinks in SEO. Unlike other tools that scan the Internet or analyze Google Search results to find backlinks, our tool focuses exclusively on verifying backlinks from a list you already have.

You might get this list of backlinks through:

- **Purchasing backlinks**: Receiving a list of donor web pages from the seller or backlinks market.
- **Creating backlinks yourself**: Posting on forums, third-party websites, or other platforms.
- **SEO service providers**: your SEO expert or company shares a reports with backlinks as one of the SEO strategies.

Once you have a list of donor web pages, it's crucial to confirm that the backlinks are present and functional. Moreover, ongoing validation is necessary to ensure the backlinks remain active and haven’t been removed over time.

This package simplifies backlink checking and verification by:

- Verifying the presence of fixed backlinks, such as `https://example.com`.
- Supporting powerful search patterns, like `*.example.com`, using [regular expressions](https://en.wikipedia.org/wiki/Regular_expression) defined by you.

With this package, monitoring and maintaining your backlinks becomes efficient and hassle-free.

Browser Scraping Modes
----------------------

[](#browser-scraping-modes)

### Simple

[](#simple)

Pros:

- **Fast**: Simple mode is faster.
- **Low resource consumption**: Simple mode uses fewer resources.
- **Minimal dependencies**: Simple mode requires fewer dependencies.
- **Shared hosting**: Simple mode works on shared hosting.

Cons:

- **No JavaScript**: Simple mode does not support JavaScript, so it works only for simple or static HTML, for example, generated by Joomla, WordPress or Drupal. It will not find backlinks on websites that require JavaScript-enabled browser, for example, websites made with Laravel, Yii, React, etc.

### Chromium

[](#chromium)

The [Chromium headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome) is used for JavaScript-enabled browsing. This approach allows parsing any website, and this is the universal mode, but it uses more resources on the server and requires a little bit more time to configure the server.

Pros:

- **Universal**: Chromium mode supports JavaScript, so it can parse any website.

Cons:

- **Slower**: Chromium mode is slower.
- **Higher resource consumption**: Chromium mode uses more resources.
- **Advanced hosting plan**: requires a VPS or dedicated server, does not work on shared hosting.

How to Install
--------------

[](#how-to-install)

### Step 1. Add the Package via Composer

[](#step-1-add-the-package-via-composer)

You must have a [Composer](https://getcomposer.org/) installed. Run the following command:

```
php composer require rvalitov/backlink-checker-php
```

Required PHP extensions:

- [`json`](https://www.php.net/manual/en/json.installation.php)
- [`sockets`](https://www.php.net/manual/en/sockets.installation.php)

### Step 2. Install the Chromium

[](#step-2-install-the-chromium)

**Note:** You can skip this step if you don't need the Chromium mode.

You need to install the following packages first, to make the Chromium work.

**For Debian/Ubuntu:**

```
apt-get update
apt-get install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
```

You must have a [Node.js](https://nodejs.org/) installed. If it's not installed, install it using the official manual.

If you use PHP 8.0 or later, you need to install the following package:

```
npm install https://github.com/zoonru/rialto
```

If you use PHP 7.4, you need to install the following package:

```
npm install @nesk/rialto
```

### Step 3. Use Autoload

[](#step-3-use-autoload)

Include the `autoload.php` in your source PHP file, for example:

```
