iggi/crawler
Composer 安装命令:
composer require iggi/crawler
包简介
A quick-start helper to website crawling.
关键字:
README 文档
README
Installation
Install the latest version with
$ composer require iggi/crawler
Basic Usage
<?php require_once "vendor/autoload.php"; use Iggi\Crawler; class MyCrawler extends Crawler { protected $uri = "https://ignatisd.gr"; public function __construct($proxy = null, $debug = 0) { parent::__construct($proxy, $debug); } public function hello() { $response = $this->curlRequest->get($this->getUrl("/hello"))->exec(); if ($response->code === 200) { return json_decode($response->body, true); } return $this->errorHandler("Request failed"); } } $crawler = new MyCrawler(); $result = $crawler->hello(); print_r($result); /* array( "success" => true, "message" => "Hello world!" ) */
Author
Ignatios Drakoulas - ignatisnb@gmail.com - https://twitter.com/ignatisd
License
Crawler is licensed under the MIT License - see the LICENSE file for details
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-10-28