PHP code example of net-tools / cloudconvert

1. Go to this page and download the library: Download net-tools/cloudconvert 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/ */

    

net-tools / cloudconvert example snippets


// $APIKEY must contain the API key from your CloudConvert account
// $URL refers to a file hosted on your website will be downloaded 
// and converted (e.g. : http://mysite.info/test.pdf).
$client = new Nettools\CloudConvert\Client($apikey);
$client->convertDownload('pdf', 'txt', $url, array('download'=>'inline'));
// and also :
$client->convertUpload('pdf', 'txt', '/home/tmp/mypdf.pdf', array('download'=>'inline'));