PHPackages                             zyan/url2pic-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zyan/url2pic-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zyan/url2pic-sdk
================

url2pic网页转图片

1.0.2(1y ago)114.5kMITPHPPHP &gt;=7.3

Since Apr 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/aa24615/url2pic-sdk)[ Packagist](https://packagist.org/packages/zyan/url2pic-sdk)[ RSS](/packages/zyan-url2pic-sdk/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

zyan/url2pic-sdk
================

[](#zyanurl2pic-sdk)

url2pic SDK

这是一个在线网页转图片服务。

无需安装任何软件,轻松将一个网站URL保存为图片

官网:

- 单页接口
- 批量接口
- 获取结果

要求
--

[](#要求)

1. php &gt;= 7.3
2. Composer

安装
--

[](#安装)

```
composer require zyan/url2pic-sdk -vvv
```

用法
--

[](#用法)

```
use Zyan\UrlToPic\UrlToPic;

$key = '通信密钥';

$app = new UrlToPic($key);
```

### 单页接口

[](#单页接口)

```
$app->url2pic('http://www.baidu.com');

//code
//$app->url2pic(string $url, string $type = 'jpg', int $width = 1440, int $timeout = 30)
```

response

```
Array
(
    [code] => 1
    [msg] => ok
    [data] => Array
        (
            [download_link] => http://url2pic.php127.com/uploads/pic/2021-04-14/pic60765e8c046c4febb7b22335b326cd5bc40b8c80a5042_1440.jpg
        )

)
```

### 批量接口

[](#批量接口)

```
$urls = [
    'http://www.php127.com',
    'http://www.baidu.com'
];
$app->batch($urls);

//code
//$app->batch(array $urls, string $type = 'jpg', int $width = 1440);
```

response

```
Array
(
    [code] => 1
    [msg] => ok
    [data] => Array
        (
            [taskid] => task60765e924b755202104140316346
        )

)
```

### 查询结果

[](#查询结果)

```
$app->status('taskxxxxxx');
```

response

```
Array
(
    [code] => 1
    [msg] => ok
    [data] => Array
        (
            [count] => 2
            [status] => 1
            [list] => Array
                (
                    [0] => Array
                        (
                            [url] => http://www.php127.com/
                            [state] => 1
                            [download_link] => http://url2pic.php127.com/uploads/pic/2021-04-14/pic60765c9caa717a0ed430033638fefe3a07be15d6e9eac_1440.jpg
                        )

                    [1] => Array
                        (
                            [url] => http://www.baidu.com
                            [state] => 1
                            [download_link] => http://url2pic.php127.com/uploads/pic/2021-04-14/pic60765ca1bc6d7f9cd904c266e7f7ff4d63deb9ef6adce_1440.jpg
                        )

                )

        )

)
```

参与贡献
----

[](#参与贡献)

1. fork 当前库到你的名下
2. 在你的本地修改完成审阅过后提交到你的仓库
3. 提交 PR 并描述你的修改，等待合并

License
-------

[](#license)

[MIT license](https://opensource.org/licenses/MIT)

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance42

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~673 days

Total

3

Last Release

504d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fbcdf7ec634eb735375fa4f6046f91646934f9eb07456f4b4dcbdec545c6435b?d=identicon)[aa24615](/maintainers/aa24615)

---

Top Contributors

[![aa24615](https://avatars.githubusercontent.com/u/33275679?v=4)](https://github.com/aa24615 "aa24615 (2 commits)")

---

Tags

url2pic

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/zyan-url2pic-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/zyan-url2pic-sdk/health.svg)](https://phpackages.com/packages/zyan-url2pic-sdk)
```

###  Alternatives

[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

343121.4M78](/packages/google-cloud-core)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
