matula/firstimg
Composer 安装命令:
composer require matula/firstimg
包简介
Get the first image from a web page
README 文档
README
Simple library that returns the first image on a web page. Though, only if it's in an <img> tag.
Installation
Add to your composer.json file
"matula/firstimg": "dev-master"
Usage
$url = 'http://google.com';
$image = new Matula\Firstimg\Firstimg($url);
echo $image->downloadImage();
This will find the first image on the page and download it. Currently, it also resizes the image to 100px.
TODO
- better documentation
- customize the image's filename/extension
- customize image resizing, or disable
- better formatting, etc
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-08-03