Download the PHP package chrisrhymes/link-checker without Composer

On this page you can find all versions of the php package chrisrhymes/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

Link Checker for Laravel

A package that will check for broken links in the specified model's fields. It will check both URL fields and fields containing HTML.

Downloads Downloads

Contents

Getting Started

Migrate the database

Add the Trait to your models

Add the HasBrokenLinks trait to your model

Publish the config (optional)

By default, the timeout for link checks is set to 10 seconds. There are also settings for the rate limiting.

If you wish to change this then publish the configuration file and update the values.

Usage

Then you can check if the model has broken links in the specified field(s).

This will queue a job to get the links from the model, which will then queue a job to check each link it finds.

The job will record an entry in the database for broken links with an empty url, but will skip testing mailto or tel links.

You will then need to run the queue to run the checks.

It checks the link using the Laravel Http client Http::get($link)->failed() and if it fails it is determined to be a broken link.

Any broken links will be stored in the broken_links table, with a polymorphic relationship back to the original model.

If an exception is thrown, such as a timeout, then an exception_message will also be recorded in the broken_links table.

Relative links

If you have relative links within a html field in your model (that don't begin with 'http'), then you can pass a 3rd parameter as the base. The CheckModelForBrokenLinks job will prepend the base to the relative url before it is checked.

If your relative links don't begin with /, then ensure your base parameter has a trailing slash, 'http://example.com/'.

Rate Limiting

In order to reduce the amount of requests sent to a domain at a time, this package has rate limiting enabled.

The configuration file allows you to set the rate_limit to set how many requests can be sent to a single domain within a minute. The default is set to 5, so adjust as required for your circumstances.

The configuration file also allows you to set the retry_until so the job will be retried until the time limit (in munites) is reached.

User Agent

To set a custom user agent for requests sent by the link checker, set the user_agent in the configuration file. For example 'user_agent' => 'my-user-agent',

The default value is link-checker.

Verify SSL

To disable verifying the SSL certificate of the link you are checking, publish the package configuration and then set 'verify' => false,.

This uses the HTTP client withOptions() to set the verify request option in Guzzle.

Tests

The tests are built with Pest.

Run the tests using either of the below commands.


All versions of link-checker with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.2
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 chrisrhymes/link-checker contains the following files

Loading the files please wait ....