60

GitHub - dantleech/fink: PHP Link Checker

 5 years ago
source link: https://github.com/dantleech/fink
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

Fink

Build Status

Fink (pronounced "Phpink") is a command line tool for checking HTTP links written in PHP.

  • Check websites for broken links or error pages.PHP
  • Fast concurrent HTTP requests.

recording

Installation

Install as a stand-alone tool or as a project dependency:

Installing as a project dependency

$ composer require dantleech/fink --dev

Usage

Run the command with a single URL to start crawling:

$ ./vendor/bin/fink crawl https://www.example.com

Use --output=somefile to log verbose information for each URL in JSON format, including:

  • url: Then tested URL.
  • status: The HTTP status code.
  • referrer: The page which linked to the URL.
  • distance: The number of links away from the start document.
  • request-time: Number of microseconds taken to make the request.
  • exception: Any runtime exception encountered (e.g. malformed URL, etc).

Options

  • --output=out.json: Output JSON report for each URL to given file (truncates existing content).
  • --concurrency: Number of simultaneous HTTP requests to use.
  • --no-dedupe: Do not filter duplicate URLs (can result in a non-terminating process).
  • --descendants-only: Only crawl direct descendnats of the given URL
  • --insecure: Do not verify SSL certificates.
  • --max-distance: Maximum allowed distance from base URL (if not specified then there is no limitation).
  • --load-cookies: Load from a cookies.txt.

Exit Codes

  • 0: All URLs were successful.
  • 1: Unexpected runtime error.
  • 2: At least one URL failed to resolve successfully.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK