![](/_next/image/?url=%2Fimg%2Fapi%2Fkey.png&w=640&q=75)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiKey = 'myApiKey';
$client = new Webpractik\OcfConverter\Sdk\OcfClient($apiKey);
$filePath = '/path/to/file/to/convert.png';
$extensionToConvertTo = 'pdf';
try {
$task = $client->uploadFile($filePath, $extensionToConvertTo);
$result = $task->waitForConversion();
if ($result->isSuccess()) {
$resultUrl = $result->getResultingFileUrl();
$resultFileName = basename($resultUrl);
if (file_put_contents($resultFileName, file_get_contents($resultUrl))) {
$result->deleteFile();
}
}
} catch (Exception $e) {
echo 'Exception: ', $e->getMessage(), PHP_EOL;
}
API 사용의 이점
저희 온라인 파일 변환기 - 모든 오디오 변환 요구에 대한 원스톱 솔루션입니다. 저희 오디오 컨버터 API는 효율적인 오디오 형식 변환을 위한 이상적인 선택을 가능하게 하는 다양한 장점을 제공합니다.
사용자는 어떤 크기의 파일도 제한 없이 변환할 수 있어 다양한 데이터로 작업할 때 편리하고 유연하게 사용할 수 있습니다.
변환 프로세스에 시간 제한이 없으므로 프로세스가 완료될 때까지 기다릴 필요 없이 크고 복잡한 파일도 처리할 수 있습니다.
사용자는 여러 파일을 동시에 변환할 수 있어 대량의 데이터로 작업할 때 효율성을 높이고 시간을 절약할 수 있습니다.
What our customers say