PHP code example of xinrui5577 / beanbun
1. Go to this page and download the library: Download xinrui5577/beanbun 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/ */
xinrui5577 / beanbun example snippets
php
use Beanbun\Beanbun;
$beanbun = new Beanbun;
$beanbun->seed = [
'http://www.950d.com/',
'http://www.950d.com/list-1.html',
'http://www.950d.com/list-2.html',
];
$beanbun->afterDownloadPage = function($beanbun) {
file_put_contents(__DIR__ . '/' . md5($beanbun->url), $beanbun->page);
};
$beanbun->start();
$ php start.php