Download the PHP package bopoda/robots-txt-parser without Composer

On this page you can find all versions of the php package bopoda/robots-txt-parser. 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 robots-txt-parser

robots-txt-parser

Build Status

RobotsTxtParser — PHP class for parsing all the directives of the robots.txt files

RobotsTxtValidator — PHP class for check is url allow or disallow according to robots.txt rules.

Try demo of RobotsTxtParser on-line on live domains.

Parsing is carried out according to the rules in accordance with Google & Yandex specifications:

Last improvements:

  1. Pars the Clean-param directive according to the clean-param syntax.
  2. Deleting comments (everything following the '#' character, up to the first line break, is disregarded)
  3. The improvement of the Parse of Host — the intersection directive, should refer to the user-agent '*'; If there are multiple hosts, the search engines take the value of the first.
  4. From the class, unused methods are removed, refactoring done, the scope of properties of the class is corrected.
  5. Added more test cases, as well as test cases added to the whole new functionality.
  6. RobotsTxtValidator class added to check if url is allowed to parsing.
  7. With version 2.0, the speed of RobotsTxtParser was significantly improved.

Supported Directives:

Installation

Install the latest version with

Run tests

Run phpunit tests using command

Usage example

You can start the parser by getting the content of a robots.txt file from a website:

Or simply using the contents of the file as input (ie: when the content is already cached):

This will output:

In order to validate URL, use the RobotsTxtValidator class:

Contribution

Feel free to create PR in this repository. Please, follow PSR style.

See the list of contributors which participated in this project.

Final Notes:

Please use v2.0+ version which works by same rules but is more highly performance.


All versions of robots-txt-parser with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
ext-mbstring Version *
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 bopoda/robots-txt-parser contains the following files

Loading the files please wait ....