Download the PHP package vdb/php-spider without Composer

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

Build Status Latest Stable Version Total Downloads License

PHP-Spider Features

This Spider does not support Javascript.

Installation

The easiest way to install PHP-Spider is with composer. Find it on Packagist.

Usage

This is a very simple example. This code can be found in example/example_complex.php. That file contains a more real-world example.

Note that by default, the spider stops processing when it encounters a 4XX or 5XX error responses. To set the spider up to keep processing, please see the link checker example. It uses a custom request handler, that configures the default Guzzle request handler to not fail on 4XX and 5XX responses.

First create the spider

Add a URI discoverer. Without it, the spider does nothing. In this case, we want all <a> nodes from a certain <div>

Set some sane options for this example. In this case, we only get the first 10 items from the start page.

Add a listener to collect stats from the Spider and the QueueManager. There are more components that dispatch events you can use.

Execute the crawl

When crawling is done, we could get some info about the crawl

Finally we could do some processing on the downloaded resources. In this example, we will echo the title of all resources

Contributing

Contributing to PHP-Spider is as easy as Forking the repository on Github and submitting a Pull Request. The Symfony documentation contains an excellent guide for how to do that properly here: Submitting a Patch.

There a few requirements for a Pull Request to be accepted:

Note: An easy way to check if your code conforms to PHP-Spider is by running the script bin/static-analysis, which is part of this repo. This will run the following tools, configured for PHP-Spider: PHP CodeSniffer, PHP Mess Detector and PHP Copy/Paste Detector.

Note: To run PHPUnit with coverage, and to check that coverage == 100%, you can run bin/coverage-enforce.

Support

For things like reporting bugs and requesting features it is best to create an issue here on GitHub. It is even better to accompany it with a Pull Request. ;-)

License

PHP-Spider is licensed under the MIT license.


All versions of php-spider with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-dom Version *
ext-pcntl Version *
guzzlehttp/guzzle Version ^6.0.0||^7.0.0
pdepend/pdepend Version ^2.16.1
symfony/css-selector Version ^3.0.0||^4.0.0||^5.0.0||^6.0||^7.0
symfony/dom-crawler Version ^3.0.0||^4.0.0||^5.0.0||^6.0||^7.0
symfony/finder Version ^3.0.0||^4.0.0||^5.0.0||^6.0||^7.0
symfony/event-dispatcher Version ^4.0.0||^5.0.0||^6.0||^7.0
vdb/uri Version ^0.3.2
spatie/robots-txt Version ^2.0
phan/phan Version ^4.0||^5.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 vdb/php-spider contains the following files

Loading the files please wait ....