Download the PHP package conversiontools/conversiontools-php without Composer

On this page you can find all versions of the php package conversiontools/conversiontools-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package conversiontools-php

Conversion Tools PHP Client

Conversion Tools is an online service for converting files between formats — XML, Excel, PDF, Word, CSV, JSON, images, audio, video, and more.

This library integrates file conversion into PHP applications via the Conversion Tools REST API.

Requirements

Installation

Quick Start

Get your API token from conversiontools.io/profile.

Examples

Convert a file

Convert a URL

Use a pre-uploaded file

Manual control (upload → task → wait → download)

Fire and forget (webhook)

Error handling

API

new ConversionToolsClient(array $config)

Key Type Default Description
api_token string required API token from your profile
base_url string https://api.conversiontools.io/v1 API base URL
timeout float (ms) 300000 Request timeout
retries int 3 Retry attempts on transient errors
retry_delay float (ms) 1000 Initial retry delay (doubles each attempt)
polling_interval float (ms) 5000 How often to poll task status
max_polling_interval float (ms) 30000 Max polling interval (with backoff)
polling_backoff float 1.5 Polling backoff multiplier
webhook_url string null Default webhook URL for all tasks
on_conversion_progress callable null Called on each poll with progress info

convert(string $conversionType, string|array $input, ?string $output, array $options, bool $wait, ?string $callbackUrl): string

One-call conversion. Returns the output file path (if $wait=true) or task ID (if $wait=false).

Input formats:

createTask(string $conversionType, array $options, ?string $callbackUrl): Task

Create a task without waiting. Returns a Task object.

getTask(string $taskId): Task

Retrieve an existing task by ID.

getRateLimits(): ?array

Returns rate limit info from the last API response.

Task

Method Description
wait(array $options = []) Poll until complete. Accepts polling_interval, max_polling_interval, timeout, on_progress
downloadTo(?string $path) Download result to file, returns resolved path
downloadBytes() Download result as string
refresh() Re-fetch status from API
getStatus() Returns current status string
isSuccess() / isError() / isRunning() / isComplete() Status helpers
toArray() Serialize task state

$client->files

Method Description
upload(string $filePath): string Upload file, returns file_id
getInfo(string $fileId): array Get file metadata
downloadBytes(string $fileId): string Download as string
downloadTo(string $fileId, ?string $outputPath): string Download to file

$client->tasks

Method Description
create(array $request): array Create task (low-level)
getStatus(string $taskId): array Get task status
list(?string $status): array List tasks, optionally filtered by status

Exceptions

All exceptions extend ConversionToolsException and expose $errorCode and $httpStatus.

Exception Trigger
AuthenticationException Invalid or missing API token
ValidationException Bad request parameters
RateLimitException Quota exceeded — has $limits property
FileNotFoundException File ID not found
TaskNotFoundException Task ID not found
ConversionException Task failed — has $taskId and $taskError
TimeoutException Request or polling timed out
NetworkException Connection error

Documentation

Full list of conversion types and options: conversiontools.io/api-documentation

License

Licensed under Conversion Tools


All versions of conversiontools-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
guzzlehttp/guzzle Version ^7.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package conversiontools/conversiontools-php contains the following files

Loading the files please wait ...