Download the PHP package cloudconvert/cloudconvert-php without Composer
On this page you can find all versions of the php package cloudconvert/cloudconvert-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cloudconvert/cloudconvert-php
More information about cloudconvert/cloudconvert-php
Files in cloudconvert/cloudconvert-php
Package cloudconvert-php
Short Description PHP SDK for CloudConvert APIs
License
Homepage https://github.com/cloudconvert/cloudconvert-php
Informations about the package cloudconvert-php
cloudconvert-php
This is the official PHP SDK for the CloudConvert API v2.
Install
To install the PHP SDK you will need to be using Composer in your project.
Install the SDK alongside Guzzle:
This package is not tied to any specific HTTP client by using PSR-7, PSR-17, PSR-18, and HTTPlug. Therefore, you will also need to install packages that provide psr/http-client-implementation
and psr/http-factory-implementation
(for example Guzzle).
Creating Jobs
You can use the CloudConvert Job Builder to see the available options for the various task types.
Uploading Files
Uploads to CloudConvert are done via import/upload
tasks (see the docs). This SDK offers a convenient upload method:
The upload()
method accepts a string, PHP resource or PSR-7 StreamInterface
as second parameter.
You can also directly allow clients to upload files to CloudConvert:
Downloading Files
CloudConvert can generate public URLs for using export/url
tasks. You can use the PHP SDK to download the output files when the Job is finished.
The download()
method returns a PSR-7 StreamInterface
, which can be used as a PHP resource using detach()
.
Webhooks
Webhooks can be created on the CloudConvert Dashboard and you can also find the required signing secret there.
Alternatively, you can construct a WebhookEvent
using a PSR-7 RequestInterface
:
Signed URLs
Signed URLs allow converting files on demand only using URL query parameters. The PHP SDK allows to generate such URLs. Therefore, you need to obtain a signed URL base and a signing secret on the CloudConvert Dashboard.
Setting a Region
By default, the region in your account settings is used. Alternatively, you can set a fixed region:
Unit Tests
vendor/bin/phpunit --testsuite unit
Integration Tests
vendor/bin/phpunit --testsuite integration
By default, this runs the integration tests against the Sandbox API with an official CloudConvert account. If you would like to use your own account, you can set your API key using the CLOUDCONVERT_API_KEY
enviroment variable. In this case you need to whitelist the following MD5 hashes for Sandbox API (using the CloudConvert dashboard).
53d6fe6b688c31c565907c81de625046 input.pdf
99d4c165f77af02015aa647770286cf9 input.png
Resources
All versions of cloudconvert-php with dependencies
ext-json Version *
php-http/httplug Version ^2.4
php-http/client-common Version ^2.0
php-http/discovery Version ^1.17
php-http/multipart-stream-builder Version ^1.3
psr/http-message Version ^1.1 || ^2.0
psr/http-factory-implementation Version ^1.0
psr/http-client-implementation Version ^1.0
symfony/options-resolver Version ^4.2 || ^5.0 || ^6.0 || ^7.0
netresearch/jsonmapper Version ^4.0