PHPackages                             dantleech/fink - 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. dantleech/fink

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

dantleech/fink
==============

Checks Links

0.11.3(3mo ago)2266.3k28[24 issues](https://github.com/dantleech/fink/issues)[5 PRs](https://github.com/dantleech/fink/pulls)2MITPHPPHP ^8.0CI passing

Since Jan 20Pushed 3mo ago6 watchersCompare

[ Source](https://github.com/dantleech/fink)[ Packagist](https://packagist.org/packages/dantleech/fink)[ GitHub Sponsors](https://github.com/dantleech)[ RSS](/packages/dantleech-fink/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (14)Versions (25)Used By (2)

Fink
====

[](#fink)

[![Build Status](https://camo.githubusercontent.com/910549b52bbcac4e03e62b34826eb117e7e909f388e7ceb433382c341e8ae8b6/68747470733a2f2f7472617669732d63692e6f72672f64616e746c656563682f66696e6b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dantleech/fink)

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

- Check websites for broken links or error pages.
- Asynchronous HTTP requests.

[![recording](https://user-images.githubusercontent.com/530801/55685040-e4f11400-5949-11e9-9f79-51c5c23a40c0.gif)](https://user-images.githubusercontent.com/530801/55685040-e4f11400-5949-11e9-9f79-51c5c23a40c0.gif)

Installation
------------

[](#installation)

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

### Installing as a project dependency

[](#installing-as-a-project-dependency)

```
$ composer require dantleech/fink --dev
```

### Installing from a PHAR

[](#installing-from-a-phar)

Download the PHAR from the [Releases](https://github.com/dantleech/fink/releases) page.

### Building your own PHAR with Box

[](#building-your-own-phar-with-box)

You can build your own PHAR by cloning this repository and running:

```
$ ./vendor/bin/box compile
```

Usage
-----

[](#usage)

Run the command with a single URL to start crawling:

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

```

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

- `url`: The tested URL.
- `status`: The HTTP status code.
- `referrer`: The page which linked to the URL.
- `referrer_title`: The value (e.g. link title) of the referring element.
- `referrer_xpath`: The path to the node in the referring document.
- `distance`: The number of links away from the start document.
- `request_time`: Number of microseconds taken to make the request.
- `timestamp`: The time that the request was made.
- `exception`: Any runtime exception encountered (e.g. malformed URL, etc).

Arguments
---------

[](#arguments)

- `url` (multiple) Specify one or more base URLs to crawl (mandatory).

Options
-------

[](#options)

- `--client-max-body-size`: Max body size for HTTP client (in bytes).
- `--client-max-header-size`: Max header size for HTTP client (in bytes).
- `--client-redirects=5`: Set the maximum number of times the client should redirect (`0` to never redirect).
- `--client-security-level=1`: Set the default SSL [security level](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_security_level.html)
- `--client-timeout=15000`: Set the maximum amount of time (in milliseconds) the client should wait for a response, defaults to 15,000 (15 seconds).
- `--concurrency`: Number of simultaneous HTTP requests to use.
- `--display-bufsize=10`: Set the number of URLs to consider when showing the display.
- `--display=+memory`: Set, add or remove elements of the runtime display (prefix with `-` or `+` to modify the default set).
- `--exclude-url=logout`: (multiple) Exclude URLs matching the given PCRE pattern.
- `--header="Foo: Bar"`: (multiple) Specify custom header(s).
- `--help`: Display available options.
- `--include-link=foobar.html`: Include given link as if it were linked from the base URL.
- `--insecure`: Do not verify SSL certificates.
- `--load-cookies`: Load from a [cookies.txt](http://www.cookiecentral.com/faq/#3.5).
- `--max-distance`: Maximum allowed distance from base URL (if not specified then there is no limitation).
- `--max-external-distance`: Limit the external (disjoint) distance from the base URL.
- `--no-dedupe`: Do *not* filter duplicate URLs (can result in a non-terminating process).
- `--output=out.json`: Output JSON report for each URL to given file (truncates existing content).
- `--publisher=csv`: Set the publisher (defaults to `json`) can be either `json` or `csv`.
- `--rate`: Set a maximum number of requests to make in a second.
- `--stdout`: Stream to STDOUT directly, disables display and any specified outfile.

Examples
--------

[](#examples)

### Crawl a single website

[](#crawl-a-single-website)

```
$ fink http://www.example.com --max-external-distance=0

```

### Crawl a single website and check the status of external links

[](#crawl-a-single-website-and-check-the-status-of-external-links)

```
$ fink http://www.example.com --max-external-distance=1

```

### Use `jq` to analyse results

[](#use-jq-to-analyse-results)

[jq](https://stedolan.github.io/jq/) is a tool which can be used to query and manipulate JSON data.

```
$ fink http://www.example.com -x0 -oreport.json

```

```
$ cat report.json| jq -c '. | select(.status==404) | {url: .url, referrer: .referrer}' | jq

```

### Crawl pages behind a login

[](#crawl-pages-behind-a-login)

```
# create a cookies file for later re-use (simulate a login in this case via HTTP-POST)
$ curl -L --cookie-jar mycookies.txt -d username=myLogin -d password=MyP4ssw0rd https://www.example.org/my/login/url

# re-use the cookies file with your fink crawl command
$ fink https://www.example.org/myaccount --load-cookies=mycookies.txt

```

note: its not possible to create the cookie jar on computer A, store it and read it in again on e.g. a linux server. you need to create the cookie file from the very same ip, because otherwise server side session handling might not continue the http-session because of a IP mismatch

Exit Codes
----------

[](#exit-codes)

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

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance79

Regular maintenance activity

Popularity38

Limited adoption so far

Community29

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 85% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~135 days

Recently: every ~460 days

Total

20

Last Release

97d ago

PHP version history (4 changes)0.2.0PHP ^7.1

0.10.0PHP ^7.2

0.10.2PHP ^7.3||^8.0

0.11.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/24ec7d5d6b7ea54007be5d7b4f43800381cc1e22929f7d2276fba30e497fdfa6?d=identicon)[dantleech](/maintainers/dantleech)

---

Top Contributors

[![dantleech](https://avatars.githubusercontent.com/u/530801?v=4)](https://github.com/dantleech "dantleech (256 commits)")[![kelunik](https://avatars.githubusercontent.com/u/2743004?v=4)](https://github.com/kelunik "kelunik (15 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (8 commits)")[![eHtmlu](https://avatars.githubusercontent.com/u/23098195?v=4)](https://github.com/eHtmlu "eHtmlu (5 commits)")[![alexander-schranz](https://avatars.githubusercontent.com/u/1698337?v=4)](https://github.com/alexander-schranz "alexander-schranz (5 commits)")[![aszenz](https://avatars.githubusercontent.com/u/25319264?v=4)](https://github.com/aszenz "aszenz (2 commits)")[![BackEndTea](https://avatars.githubusercontent.com/u/14289961?v=4)](https://github.com/BackEndTea "BackEndTea (2 commits)")[![a-ast](https://avatars.githubusercontent.com/u/6177375?v=4)](https://github.com/a-ast "a-ast (1 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (1 commits)")[![c33s](https://avatars.githubusercontent.com/u/649209?v=4)](https://github.com/c33s "c33s (1 commits)")[![chapeupreto](https://avatars.githubusercontent.com/u/834048?v=4)](https://github.com/chapeupreto "chapeupreto (1 commits)")[![fjgarlin](https://avatars.githubusercontent.com/u/898540?v=4)](https://github.com/fjgarlin "fjgarlin (1 commits)")[![greg0ire](https://avatars.githubusercontent.com/u/657779?v=4)](https://github.com/greg0ire "greg0ire (1 commits)")[![LeSuisse](https://avatars.githubusercontent.com/u/737767?v=4)](https://github.com/LeSuisse "LeSuisse (1 commits)")[![M-arcus](https://avatars.githubusercontent.com/u/25648755?v=4)](https://github.com/M-arcus "M-arcus (1 commits)")

---

Tags

link-checkerphpspider

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dantleech-fink/health.svg)

```
[![Health](https://phpackages.com/badges/dantleech-fink/health.svg)](https://phpackages.com/packages/dantleech-fink)
```

###  Alternatives

[danog/madelineproto

Async PHP client API for the telegram MTProto protocol.

3.4k855.0k18](/packages/danog-madelineproto)[league/uri-components

URI components manipulation library

31932.3M67](/packages/league-uri-components)[scssphp/scssphp

scssphp is a compiler for SCSS written in PHP.

62827.7M220](/packages/scssphp-scssphp)[fivefilters/readability.php

A PHP port of Readability.js

311826.8k5](/packages/fivefilters-readabilityphp)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[kelunik/acme

ACME library written in PHP.

121603.9k3](/packages/kelunik-acme)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
