dimaskao / library_for_making_screenshots
此软件包最新版本(2.0.0)没有提供许可证信息。
使用此库,您可以从Excel文件中获取URL并生成页面截图。
2.0.0
2021-02-07 12:56 UTC
Requires
- php: >=7.4
- jonnyw/php-phantomjs: 4.*
- phpoffice/phpspreadsheet: ^1.16
This package is auto-updated.
Last update: 2024-09-07 21:06:00 UTC
README
使用此库,您可以使用PHP脚本自动生成页面截图。
通用
在您的Excel文件中,必须有一个包含URL的列,以及URL右侧或左侧的空白列用于保存文件名。您可以在->getScreenshots()方法中指定它们。
安装
您可以使用composer安装此扩展。
只需运行
$ composer require dimaskao/library_for_making_screenshots
如何使用
首先包含此库类
require_once __DIR__ . '/XXXXX/vendor/autoload.php'; use Dimaskao\Screenshoter\Screenshoter;
位置
XXXXX 到库根目录的路径;
然后使用->getScreenshots()方法
$screenshoter = new Screenshoter('path/to/folder');//in tis folder will be saving screenshots $screenshoter->getScreenshots('dir/', 'B', 'C');
dir/ - Excel文件路径
B - URL所在的列
C - 保存文件名的列