- This is a demo project to demonstrate how the Backlink Checker PHP library works.
- The script is useful for SEO experts to validate your backlink assets.
- It checks that the backlinks are present or not on the defined web page.
- You get the web page from your backlink collection (bought at market or got by other means).
- Clone the repository
- Install dependencies with Composer
composer install --no-dev
- Install dependencies with NPM
npm ci --omit=dev
The executable script is in src
folder.
Script usage:
php cli_test.php -u URL -p PATTERN [-m MODE]
Arguments:
URL
(required) — URL to check for backlinksPATTERN
(required) — a regular expression pattern that defines a backlink to search forMODE
(optional) — scraping mode. Possible values:javascript
(default) - Chromium headless mode is used with JavaScript supportsimple
- simple parsing of HTML, without JavaScript support
If javascript
mode is used then the script takes a screenshot of the web page
and saves it in JPEG format in the screenshots
folder.
Input and output:
php cli_test.php -u https://dubaidance.com/ -p "@^https://(www\.)?dubaidance\.com.*@"
Using mode: javascript
Found 1 backlinks
Found <a> src=https://dubaidance.com/ anchor=go now
All operations complete