dopplrhub/php-sdk
Composer 安装命令:
composer require dopplrhub/php-sdk
包简介
PHP SDK for the DopplrHub file conversion API
README 文档
README
A chainable PHP SDK for the current DopplrHub public API, including generic conversions, tools, and utility endpoints.
Install
composer require dopplrhub/php-sdk
Or for this local scaffold:
cd D:\AudioConverter\sdk\php-sdk composer dump-autoload
If you want to distribute the SDK directly from the backend, this workspace now exposes a zip bundle at /api/sdk/php-sdk.zip.
Local file conversion
<?php require __DIR__ . '/vendor/autoload.php'; use DopplrHub\DopplrHub; $api = new DopplrHub('YOUR_API_KEY', 'https://api.dopplrhub.com/api/v1'); $api->start('./input.pdf', 'jpg') ->wait() ->download('./input.jpg') ->delete();
Remote file conversion
<?php require __DIR__ . '/vendor/autoload.php'; use DopplrHub\DopplrHub; $api = new DopplrHub('YOUR_API_KEY', 'https://api.dopplrhub.com/api/v1'); $api->startFromURL('https://example.com/brochure.pdf', 'png') ->wait() ->download('./brochure.png') ->delete();
Tools
<?php require __DIR__ . '/vendor/autoload.php'; use DopplrHub\DopplrHub; $api = new DopplrHub('YOUR_API_KEY', 'https://api.dopplrhub.com/api/v1'); $api->tools()->ocr('./scan.pdf', 'ocr-docx', ['language' => 'eng']) ->wait() ->download('./scan.docx'); $api->tools()->imageResize('./hero.png', [ 'width' => 1920, 'height' => 1080, 'fit' => 'cover', 'outputFormat' => 'webp', ])->wait()->download('./hero.webp'); $api->tools()->pdfCompress('./packet.pdf', 'screen') ->wait() ->download('./packet-compressed.pdf'); $api->tools()->videoTrim('./clip.mp4', 3, 12, [ 'outputFormat' => 'mp4', ])->wait()->download('./clip-trimmed.mp4'); $api->tools()->ada('./brochure.pdf') ->download('./brochure-ada-report.pdf'); $api->tools()->ats('./resume.pdf', 'Senior PHP engineer with API design experience', [ 'industry' => 'technology', ])->download('./resume-optimized.docx'); $api->tools()->archive(['./a.txt', './b.txt'], 'zip', [ 'archiveName' => 'documents', ])->wait()->download('./documents.zip');
Tool coverage in the PHP SDK includes ocr(), pdf(), image(), video(), ada(), ats(), atsReexport(), and archive() on $api->tools().
Examples
examples/convert-local-file.phpexamples/convert-remote-file.phpexamples/ocr-tool.phpexamples/pdf-tool.phpexamples/image-tool.phpexamples/video-tool.phpexamples/ada-tool.phpexamples/ats-tool.phpexamples/tools-and-utilities.php
Utilities
<?php require __DIR__ . '/vendor/autoload.php'; use DopplrHub\DopplrHub; $api = new DopplrHub('YOUR_API_KEY', 'https://api.dopplrhub.com/api/v1'); $formats = $api->utilities()->supportedFormats(); $rates = $api->utilities()->currencyRates('USD'); $api->utilities()->batchDownload(['JOB_ID_1', 'JOB_ID_2'], './converted_files.zip');
Important behavior note
startFromURL() currently downloads the remote resource first, then uploads it into DopplrHub.
It does not perform headless browser webpage rendering.
That means this shape is ready today for remote files like PDF, DOCX, TXT, and other downloadable assets. A call like startFromURL('http://google.com/', 'png') would require a backend webpage-render route that does not exist in the current API yet.
API summary
upload(string $filePath): UploadedFileimportFromUrl(string $url, array $options = []): UploadedFilestart(string $filePath, string $targetFormat, array $options = []): ConversionJobstartFromContents(string $contents, string $fileName, string $targetFormat): ConversionJobstartFromURL(string $url, string $targetFormat, array $options = []): ConversionJobconvert(mixed $source, string $targetFormat, array $options = []): ConversionJobtools(): ToolsClientutilities(): UtilitiesClientConversionJob::wait(?int $timeoutSeconds = null, int $pollSeconds = 2): selfConversionJob::download(?string $targetPath = null): selfConversionJob::delete(): self
dopplrhub/php-sdk 适用场景与选型建议
dopplrhub/php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 dopplrhub/php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dopplrhub/php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2026-05-11