Download the PHP package zamzar/zamzar-php without Composer
On this page you can find all versions of the php package zamzar/zamzar-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zamzar/zamzar-php
More information about zamzar/zamzar-php
Files in zamzar/zamzar-php
Package zamzar-php
Short Description Zamzar PHP Library
License MIT
Homepage https://www.zamzar.com/
Informations about the package zamzar-php
PHP file converter library for Zamzar
Easy to use PHP file conversion API with support for 1,100+ file conversions - convert documents, audio, images, video, eBooks and more. Use zamzar-php
to convert files between different formats as part of your PHP application with the Zamzar file conversion API. Common use cases include:
- Convert Microsoft Word (DOCX, DOC) to PDF
- Extract text from PDF files
- Convert Powerpoint (PPT, PPTX) to JPG
- Archive email (MSG files) to PDF
This is the official PHP SDK for the Zamzar file conversion API.
Jump to:
- Requirements
- Installation
- Dependencies
- Initialise the Zamzar Client
- Test the Connection
- Typical Usage
- Configure a Logger
- Resources
Requirements
- Before you begin, signup for a Zamzar API Account or retrieve your existing API Key from the Zamzar Developers Homepage
- PHP 7.2.34 and later.
Installation
You can install the bindings via Composer. Run the following command:
To use the bindings, use Composer's autoload:
If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the init.php
file.
Dependencies
The bindings require the following extensions in order to work properly:
If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.
Initialise the Zamzar Client
To initialise the client, declare a new ZamzarClient which accepts a string or config array:
To specify whether the client using the Production or Test API, use a Config array:
Test the Connection
To confirm your credentials are correct, test the connection to the API which will return a welcome message and confirm which API you are using (Production or Test).
Typical Usage
The most common requirement is to submit a job to convert a file, wait for the job to complete, download the converted files and delete the files on Zamzar servers.
The above use case might be applied when other things are happening in between each step, but if not, and you want to chain the whole thing together:
Configure a Logger
The library does minimal logging, if the debug
config option is used. Use either the supplied default logger or a psr-3 compatible logger.
Resources
Code Samples - Copy/Paste from examples which demonstrate all key areas of functionality.
Exceptions Handling - Learn more about API Error Codes.
Developer Docs - For more information about API operations, parameters, and responses. Use this if you need additional context on all areas of functionality.