Download the PHP package rs/link-checker without Composer
On this page you can find all versions of the php package rs/link-checker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rs/link-checker
More information about rs/link-checker
Files in rs/link-checker
Package link-checker
Short Description Visits links and checks they are still working. Also tries to return the title of html pages and pdfs.
License MIT
Homepage https://github.com/rs/link-checker
Informations about the package link-checker
Laravel Link Checker
A robust and flexible package for checking the status of URLs within your Laravel application. It concurrently checks a list of URLs, follows redirects, and intelligently extracts page titles from both HTML pages and PDF documents.
PDF title extraction is handled via a configurable AWS Lambda function, allowing for powerful, serverless processing of PDF metadata. The package is designed with a clean, extensible architecture, making it easy to add new title extraction strategies in the future.
Installation
You can install the package via composer:
Configuration
First, publish the configuration file to your application's config directory:
This will create a config/link-checker.php file.
PDF Title Extraction (Optional)
To enable title extraction from PDF documents, you must configure your AWS credentials and specify the ARN of your deployed Lambda function in your .env file.
The package will automatically use the official AWS SDK for PHP, which looks for credentials in the following order:
- IAM Role (Recommended for production environments like EC2 or ECS)
- Environment variables
If AWS_PDF_TITLE_LAMBDA_ARN is not set, the package will gracefully skip PDF title extraction without causing errors.
Usage
Using the Facade
You can use the LinkChecker facade to check an array of URLs. The check method returns a Collection of LinkCheckResult objects.
Using Dependency Injection
For developers who prefer dependency injection over facades, you can type-hint the LinkCheckerInterface in your class constructor or method. Laravel's service container will automatically resolve the correct implementation.
Passing Custom Options
The check method accepts an optional second argument for custom options, such as headers and a referrer. These options will be used for both the initial URL check and will be passed to the PDF extractor Lambda for maximum authenticity.
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.