1. Go to this page and download the library: Download babymarkt/deepl-php-lib 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/ */
babymarkt / deepl-php-lib example snippets
use \BabyMarkt\DeepL\DeepL;
$authKey = '<AUTH KEY>';
$deepl = new DeepL($authKey);
use \BabyMarkt\DeepL\DeepL;
$authKey = '<AUTH KEY>';
$deepl = new DeepL($authKey,2,'api-free.deepl.com');
$usageArray = $deepl->usage();
echo 'You have used '.$usageArray['character_count'].' of '.$usageArray['character_limit'].' in the current billing period.'.PHP_EOL;
$deepl->setTimeout(10); //give up after 10 seconds
$deepl->setProxy('http://corporate-proxy.com:3128');
$deepl->setProxyCredentials('username:password');
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.