Download the PHP package jbsommeling/scannr without Composer

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

Latest Stable Version Total Downloads Tests License PHP Version Require

Scannr

Scannr crawls your website and reports broken links, redirect chains, HTTPS downgrades, and other link-health problems, then scores the site from 0 to 100. Run it from Artisan as a dev dependency in a Laravel project, or as a Docker-based GitHub Action that can fail a build when the score drops.

What it checks

Scannr crawls breadth-first from a starting URL, optionally seeded from your sitemap (XML, HTML, plain text, or sitemap index). On each page it collects URLs from <a>, <link>, <script>, <img>, media elements, download triggers, and inline JS handlers, then requests each one and records:

Sites that render in the browser (React, Vue, Angular) can be scanned with a headless browser, either always (--js) or only when Scannr detects an SPA (--smart-js).

Scannr respects robots.txt Disallow rules and Crawl-delay, backs off exponentially on HTTP 429, and hides noise such as XML namespaces, CDN preconnect hints, and JS framework error docs unless you pass --advanced. Results come out as a table, JSON, or CSV.

Installation

The service provider is auto-discovered. Publish the config if you want to change defaults (see Configuration):

--queue stores results in the database, so it needs the migration:

--js and --smart-js need Node.js and Puppeteer:

Running a scan

Common variations:

Options

Option Default Description
--depth=N 3 Maximum crawl depth from the starting URL
--max=N 300 Maximum number of URLs to scan
--timeout=N 5 Request timeout in seconds
--format=FORMAT table Output format: table, json, or csv
--status=FILTER all Show all, ok, or broken results
--filter=TYPE all Show only one element type: all, a, link, script, img, media, form
--scan-elements=TYPES all Element types to scan: all, or comma-separated (e.g. a,img)
--sitemap off Discover URLs from the sitemap before crawling
--js off Render every page with a headless browser
--smart-js off Render with a headless browser only when an SPA is detected
--no-robots off Ignore robots.txt rules
--advanced off Show noise URLs (XML namespaces, CDN hints, etc.)
--strip-params=PARAMS — Extra tracking parameters to strip (comma-separated)
--delay-min=N config Minimum delay between requests, in ms
--delay-max=N config Maximum delay between requests, in ms
--queue off Run the scan as a background job
--fail-on-broken off Exit 1 if any link is broken
--fail-on-critical off Exit 1 if any critical issue is found
--min-rating=GRADE none Exit 1 below this rating: excellent, good, needs_attention, or none

Integrity score and quality gates

Every scan ends with an integrity score from 0 to 100, built from five components: link integrity, security hygiene, technical hygiene, redirect health, and link verifiability. The score maps to a grade:

Grade Score
Excellent 90 and above
Good 75 and above
Needs Attention 50 and above
Critical below 50

Penalty weights and grade thresholds live in config/scannr.php.

A scan only fails, with exit code 1, when you ask it to: --fail-on-broken, --fail-on-critical, or --min-rating. Without them the exit code is 0 however bad the results are. The same holds for the GitHub Action.

Example output

Table (default)
JSON (--format=json)

GitHub Action

Without fail-on-broken, fail-on-critical, or min-rating, the step reports results but never fails.

Inputs

Every CLI option except --queue is available as an input of the same name. Only url is required.

Outputs

Output Description
exit-code 0 on success, 1 when a quality gate failed
score Integrity score, 0–100
grade Excellent, Good, Needs Attention, or Critical
broken-count Number of broken links
critical-count Number of critical issues

Examples

Scan an SPA and show only broken links:

Report without failing, then act on the counts in a later step:

Weekly deep audit seeded from the sitemap:

Strict gate that requires an Excellent rating:

Scan only sites you own

Scannr is meant for websites you own or have explicit permission to test. You are responsible for staying within the site's terms of service, applicable law, and its robots.txt. Don't use it to crawl sites without permission, overload servers, get around rate limits, or reach protected or private content. The authors are not responsible for misuse.

Two checks back this up:

Artisan compares the scan URL's domain with APP_URL and warns on a mismatch. It does not block the scan, since scanning a staging or production domain from a local checkout is normal.

The GitHub Action reads an optional .scannr.yml in the repository root. If the file exists, the action blocks any URL whose domain isn't listed:

Without .scannr.yml, the action trusts the url input, because you control the workflow file.

Configuration

php artisan vendor:publish --tag=scannr-config creates config/scannr.php, where you can change:

Testing

License

MIT. See the license.


All versions of scannr with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-libxml Version *
ext-simplexml Version *
guzzlehttp/guzzle Version ^7.15.2|^8.0.1
illuminate/console Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
spatie/browsershot Version ^5.2
symfony/css-selector Version ^7.0|^8.0
symfony/dom-crawler Version ^7.0|^8.0
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 jbsommeling/scannr contains the following files

Loading the files please wait ...