1. Go to this page and download the library: Download convertapi/convertapi-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
convertapi / convertapi-php example snippets
use \ConvertApi\ConvertApi;
ConvertApi::setApiCredentials('your-api-secret-or-token');
$result = ConvertApi::convert('pdf', ['File' => '/path/to/my_file.docx']);
# save to file
$result->getFile()->save('/path/to/save/file.pdf');
# get file contents (without saving the file locally)
$contents = $result->getFile()->getContents();
# save all result files to folder
$result->saveFiles('/path/to/save/files');
# get conversion cost
$cost = $result->getConversionCost();