Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 4.07 KB

README.md

File metadata and controls

65 lines (50 loc) · 4.07 KB

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