承接 cloudlayerio/cloudlayerio-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cloudlayerio/cloudlayerio-php

最新稳定版本:1.03

Composer 安装命令:

composer require cloudlayerio/cloudlayerio-php

包简介

cloudlayer.io API Library for easy access to our REST based API services using PHP.

README 文档

README

cloudlayerio API Library for easy access to our REST based API services using PHP.

  • Convert HTML to PDFs and Images
  • Convert Webpages to PDFs and Images (using any public URL)

Example Usage

  • load composer dependencies
require __DIR__ ."/vendor/autoload.php";
  • configure a client with api key

use CloudLayerIO\Client as CloudLayer;

$apiKey = '<YOUR_API_KEY>';

CloudLayer::config([
    'api_key' => $apiKey,
]);
  • convert URL to image or pdf
$url = \CloudLayerIO\Resource\Url('http://exampl.com');
$image = $url->toImage(); // return object of \CloudLayerIO\Model\File

//save image file
$image->save('test.png');

$pdf = $url->toPdf(); // return object of \CloudLayerIO\Model\File
//save pdf file
$pdf->save('test.pdf');
  • convert HTML to image or pdf
$html = \CloudLayerIO\Resource\Html('<html></html>');
$html->toImage(); // return object of \CloudLayerIO\Model\File
$html->toPdf(); // return object of \CloudLayerIO\Model\File

统计信息

  • 总下载量: 20.05k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2020-11-25