1. Go to this page and download the library: Download icy8/web-spider library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace icy8\WebSpider\selectors;
interface Selector
{
// 设置选择器的数据内容,如html
public function setData($data);
// 执行选择,返回Array
public function select($rule);
// 执行选择,返回一条记录
public function fetch($rule);
// 返回一个新的实例,即new static()
public static function shortcut();
}