正體中文 | 简体中文 | English

:::

chklinks Version 3.09

What’s New?

2007-12-06

chklinks version 3.09 is released. Fixed the bug on systems like MS-Windows that does not have getpwuid(). Download chklinks version 3.09.

2007-12-05

chklinks version 3.08 is released. There are several documentation fixes. Download chklinks version 3.08.

2007-12-05

chklinks version 3.07 is released. Required Perl version number compatible to older versions, to work with the Perl 5.10 warning. License updated to GPLv3. Download chklinks version 3.07.

2007-06-08

chklinks version 3.06 is released. Test suite fixes. Download chklinks version 3.06.

2007-06-07

chklinks version 3.05 is released. Fixed problem with Perl version earlier than 5.8 where UTF-8 mode is not available. Download chklinks version 3.05.

2007-06-06

chklinks version 3.04 is released. Documentation fixes. Download chklinks version 3.04.

2007-06-06

chklinks version 3.03 is released. Fixed the raw UTF-8 warning with HTML::Parser. Added support for building with Module::Build. Download chklinks version 3.03.

2006-06-02

chklinks version 3.02 is released. The digital signature is corrected. Download chklinks version 3.02.

2006-05-31

chklinks version 3.01 is released. This fixed a missing prerequisites in Makefile.PL. HTML documents are returned. Download chklinks version 3.01.

2006-05-30

chklinks version 3.00 is released. It uses HTML::LinkExtor to parse the page and LWP::RobotUA to make requests. More URL schemes other than http are supported. Cookies are supported. robots.txt rules are respected. Download chklinks version 3.00.

2005-10-02

Website style adjustment. WCAG Accessibility designs are added. <hr />s are replaced by CSS borders for accessibility reason.

2005-04-27

The text 繁體中文 on the website is corrected to 正體中文.

2003-05-26

chklinks version 2.02 is released. The default changed from one-level to recursive. This is more desirable in most cases. Download chklinks version 2.02.

2003-05-25

chklinks version 2.01 is released. An installer, accessary files and a POD document are added. Download chklinks version 2.01.

2003-05-25

chklinks version 2.0.0 is released. This is the first public release uploaded onto SourceForge. Only the main script file is available. Download chklinks version 2.0.0.

2003-05-19

SourceForge project space approved.

2003-05-18

Requesting a SourceForge project space.

Description

chklinks is a non-threaded Perl link checker. It helps finding broken links on your website.

chklinks differs from linkchecker in that chklinks is non-threaded. It does not raises many simultaneously connections for its job. It won’t run out of the resources and crash your system in a moment. This is certainly more desirable for most webmasters and users.

chklinks follows robots.txt rules. If you disallow robots from your website and experience problems, you need to allow chklinks. Add the following lines to your robots.txt file to allow chklinks:

User-agent: chklinks
Disallow:

chklinks uses LWP::RobotUA and support the following schemes: http, https, ftp, gopher and file. You can also specify a local file. (To use https, you need to install Crypt::SSLeay. This is the requirement of LWP::RobotUA.)

chklinks supports cookies.

System Requirement

  1. Perl, version 5.6 or above. I have not successfully run this on earlier versions. Please tell me if you can. You can run perl -v to see your current Perl version. Perl is distributed with most Unix now. If not, or if you have an older version of Perl, you can download and install/upgrade it from Perl website. If you are using MS-Windows, you can download and install ActiveState ActivePerl.

  2. Required Perl modules:

    URI

    This is used to parse and process the found URLs. You can download and install URI from the CPAN archive, or install it with the CPAN shell by running cpan URI, or install it with the CPANPLUS shell by running cpanp i URI. Debian/Ubandu Linux users can install it by running apt-get install liburi-perl. Red Hat/Fedora/CentOS Linux users can install it by running yum install perl-URI. FreeBSD users can install it by running ports install p5-URI. ActivePerl users can install it by running ppm install URI.

    HTML::LinkExtor

    This is used to extract links from the web pages. HTML::LinkExtor is contained in the HTML-Parser distribution. You can download and install HTML::LinkExtor from the CPAN archive, or install it with the CPAN shell by running cpan HTML::LinkExtor, or install it with the CPANPLUS shell by running cpanp i HTML::LinkExtor. Debian/Ubandu Linux users can install it by running apt-get install libhtml-parser-perl. Red Hat/Fedora/CentOS Linux users can install it by running yum install perl-HTML-Parser. FreeBSD users can install it by running ports install p5-HTML-Parser. ActivePerl users can install it by running ppm install HTML::LinkExtor.

    LWP::RobotUA

    This is used to request web pages. LWP::RobotUA is contained in the libwww-perl distribution. You can download and install LWP::RobotUA from the CPAN archive, or install it with the CPAN shell by running cpan LWP::RobotUA, or install it with the CPANPLUS shell by running cpanp i LWP::RobotUA. Debian/Ubandu Linux users can install it by running apt-get install libwww-perl. Red Hat/Fedora/CentOS Linux users can install it by running yum install perl-libwww-perl. FreeBSD users can install it by running ports install p5-libwww. ActivePerl users can install it by running ppm install LWP::RobotUA.

    If you install chklinks with the CPAN or CPAN shell, the above shall be automatically installed.

  3. Optional Perl modules:

    Crypt::SSLeay

    This is needed for LWP::RobotUA to support HTTPS. You can download and install Config::General from the CPAN archive, or install it with the CPAN shell by running cpan Config::General, or install it with the CPANPLUS shell by running cpanp i Config::General. Debian/Ubandu Linux users can install it by running apt-get install libconfig-general-perl. Red Hat/Fedora/CentOS Linux users can install it by running yum install perl-Config-General. FreeBSD users can install it by running ports install p5-Config-General. ActiveState does not host the PPM build of Crypt::SSLeay for ActivePerl due to the Canadian Federal Government requirement. However, ActivePerl users can still install it from another repository, by running ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd.

Download

chklinks’s official websites is at…

You can always download the newest version of chklinks from…

imacat’s PGP public key is at…

Install

Install with ExtUtils::MakeMaker

chklinks uses standard Perl installation with ExtUtils::MakeMaker. Follow these steps:

% perl Makefile.PL
% make
% make test
% make install

When running make install, make sure you have the priviledge to write to the installation location. This usually requires the root priviledge.

If you are using ActivePerl under MS-Windows, you should use nmake instead of make. nmake can be obtained from the Microsoft FTP site.

If you want to install into another location, you can set the PREFIX. For example, to install into your home when you are not root:

% perl Makefile.PL PREFIX=/home/jessica

Refer to the docuemntation of ExtUtils::MakeMaker for more installation options (by running perldoc ExtUtils::MakeMaker).

Install with Module::Build

You can install with Module::Build instead, if you prefer. Follow these steps:

% perl Build.PL
% ./Build
% ./Build test
% ./Build install

When running ./Build install, make sure you have the priviledge to write to the installation location. This usually requires the root priviledge.

If you want to install into another location, you can set the --prefix. For example, to install into your home when you are not root:

% perl Build.PL --prefix=/home/jessica

Refer to the docuemntation of Module::Build for more installation options (by running perldoc Module::Build).

Options

./chklinks [options] URL1 [URL2 [URL3 …]]
./chklinks [-h|-v]
-1,--onelevel

Check the links on this page and stops.

-r,--recursive

Recursively check through this website. This is the default.

-b,--below

Only check the links below this directory. This is the default.

-p,--parent

Trace back to the parent directories.

-l,--local

Only check the links on this same host.

-s,--span

Check the links to other hosts (without recursion). This is the default.

-e,--exclude path

Exclude this path. Check for their existence but not check the links on them, just like they are on a foreign site. Multiple --exclude are OK.

-i,--include path

Include this path. An opposite of --exclude that cancels its effect. The latter specified has a higher priority.

-d,--debug

Display debug messages. Multiple --debug to debug more.

-q,--quiet

Disable debug messages. An opposite that cancels the effect of --debug.

-h, --help

Display the help message and exit.

-v, --version

Output version information and exit.

URL1, URL2, URL3

The URLs of the websites to check against.

Notes

See Also

LWP::UserAgent, LWP::RobotUA, WWW::RobotRules, URI, HTML::LinkExtor, Bastian Kleineidam’s linkchecker and W3C-LinkChecker checklink.

Copyright

Copyright © 2003-2007 imacat. All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Release Notes

Please read the NEWS for the new functions and bug fixes.

Support

chklinks is hosted on SourceForge, CPAN and Tavern IMACAT’s. For the latest infomation, see

There is a chklinks mailing list hosted at SourceForge. Please submit your questions, suggestions or bug reports there. It is a Mailman mailing list. For more information, see the chklinks mailing list page. Alternatively, you can send a mail to the e-mail command mailbox with the subject help for a list of available e-mail commands.