Skip to content

urisavka/site-checker

Repository files navigation

Site Checker

Build Status Scrutinizer Code Quality SensioLabsInsight

Recursively checks site for broken links, missing images, css and javascript files starting from giving URL and discovering all links on pages.

Installation

For console usage

git clone git@github.com:urisavka/site-checker.git && cd site-checker && composer update --no-dev

For usage in a project

composer require urisavka/site-checker

Configuration

Copy config/app.json.default into config/app.json and add whatever you want there.

You could also specify custom cookies to be sent with request.

Excluded URLs can be defined as regular expressions in PCRE format. Use excludedUrls option.

You may also include set of custom included Urls that are not accessible from your home page. Use includedUrls option.

If you define reportEmail parameter, email will be sent after checking with a list of broken links (if any). You can also define reportEMailFrom value to set From: field for your emails.

See config/app.json.default for example.

Usage

Console tool: sitechecker [-e|--check-external] [-s|--log-success] [-f|--full-html] [--] <site>

From your code:

$siteChecker = SiteChecker::create();
$siteChecker->check('http://gooogle.com');
$results = $siteChecker->getResults();

See CheckCommand and ConsoleObserver for real usage.

About

Check site for broken links, missing images, css and javascript files. Notifies about results by email.

Resources

License

Stars

Watchers

Forks

Packages

No packages published