Download the PHP package phil/link-checker without Composer

On this page you can find all versions of the php package phil/link-checker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package link-checker

phil/link-checker

Find the dead links in a site's content before readers do: each address checked once, paced per host, anchors verified, private networks refused.

phil/link-checker is a plain PHP library. It checks the links of the contents a site already knows — its articles, pages and descriptions — rather than crawling the site: an application hands it the HTML of a content and the address of the page that shows it, and gets back a LinkReport: every link, where it stands, and what its check found.

LinkExtractor reads the links of the HTML with PHP's HTML5 parser, as a browser reads them, malformed or not — a[href], img[src] and srcset, link[href], iframe[src], source — and resolves each against the page by the WHATWG URL Standard. UrlNormalizer gives the key under which two links to the same address are checked once; the order of the query only counts when the caller asks for it. HttpLinkProbe asks each address through phil/safe-http, which refuses the private networks and bounds the time, the bytes and the redirects: HEAD first, then a GET without body when the server refuses HEAD, each paced per host by a HostThrottle, with a neutral User-Agent the application can change.

LinkChecker classifies each link: alive; redirected, permanently or temporarily, with its target; dead (404, 410, a host name that does not exist); to review (429, 403, a timeout, a TLS error), never counted as dead; refused, for an address that is not public. A link to the site itself must find its #fragment in the target page, read without a request when the application gives it through InternalPages. Results are kept in a Symfony cache between batches, and every address is asked once per batch. Only the address a link names is ever requested: the checker never follows a link further into another site.

Status

Part State
LinkExtractor, ExtractedLinks, Link: links of HTML read by the HTML5 parser, resolved, bounded Implemented and tested
UrlNormalizer: deduplication key, query sorted only on request Implemented and tested
HttpLinkProbe: HEAD then bounded GET over phil/safe-http, redirects and their permanence Implemented and tested
IntervalThrottle and the HostThrottle port: a pace per host, on a clock Implemented and tested
LinkChecker: classification, anchors of internal pages, InternalPages, cache, batches Implemented and tested
LinkReport, CheckedLink: the report as text and JSON Implemented and tested
The DeadLinkFixer port Declared; implemented by a bundle or the application

Documentation

Document What it covers
Installation Requirements, installing, and a first check from start to end.
Checking links The links read, the key, the requests, each status, the anchors, the report.
Extension points The ports, batches and queues, the cache, the throttle, the internal pages.
Continuous integration Checking the links of a repository's files with lychee, beside this library.
Testing The tests, the fuzz target and the benchmark.
Reference Every public type, with its role.

Quick start

Requirements

PHP 8.5 or later, with ext-dom, ext-mbstring and ext-uri; phil/safe-http and phil/url; Symfony's HttpClient, Clock and the cache and service contracts.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.


All versions of link-checker with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-dom Version *
ext-libxml Version *
ext-mbstring Version *
ext-uri Version *
phil/safe-http Version ^0.2@dev
phil/url Version ^0.1@dev
symfony/cache-contracts Version ^3.6
symfony/clock Version ^8.2
symfony/http-client Version ^8.2
symfony/http-client-contracts Version ^3.6
symfony/service-contracts Version ^3.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phil/link-checker contains the following files

Loading the files please wait ...