Skip to content

Examples and demo of backlink-checker-php library

License

Notifications You must be signed in to change notification settings

rvalitov/backlink-checker-php-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backlink Checker PHP Demo

PHP version icon Platform icon Codacy Badge Codacy Badge Code Smells Maintainability Rating Security Rating Bugs Vulnerabilities Reliability Rating Technical Debt Tests GitHub License

  • 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).

Installation

  1. Clone the repository
  2. Install dependencies with Composer composer install --no-dev
  3. Install dependencies with NPM npm ci --omit=dev

Synopsis

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 backlinks
  • PATTERN (required) — a regular expression pattern that defines a backlink to search for
  • MODE (optional) — scraping mode. Possible values:
    • javascript (default) - Chromium headless mode is used with JavaScript support
    • simple - 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.

Usage Example

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

References