Zactonz PHP SDK

v0.1.0

PHP client for the Zactonz APIs: QR codes and barcodes, screenshots and PDFs, social card images, image conversion, link previews, page to Markdown, SSL, DNS, WHOIS, email checks and translation.

PHP 8.1+curl and json extensionsNo other dependencies Updated 6 Oct 2026

The Zactonz PHP SDK wraps every public endpoint on api.zactonz.com in a typed PHP method. You pass arguments by name, read results as arrays or through a small helper, and let the client handle API keys, rate limits and retries.

use Zactonz\Client;

$zactonz = new Client('zk_qr_your_key');

$qr = $zactonz->qr()->encode(content: 'https://zactonz.com', size: 6);
echo $qr['qr'];

What you get#

  • Named arguments for every endpoint, with the API's own parameter descriptions in your editor. An argument you leave out is not sent, so the API applies its default.
  • Twenty-three methods on eleven services, generated from the same OpenAPI specifications that produce this portal's reference pages, so they never drift from the API.
  • One key per product. Pass all the keys you use and the client picks the right one for each call.
  • Exceptions for every failure, including failures the API reports inside an HTTP 200 body.
  • Retries only where a retry cannot repeat work, with the API's Retry-After honoured.
  • Raw bytes when you want them. A method whose name ends in File returns the image or PDF instead of a link.
  • A fake transport for your own test suite, so your code is tested without the network.

Services#

Accessor Methods Key product
qr() encode, encodeFile, decode qr
barcode() encode, encodeFile barcode
screenshot() capture, captureFile, captureHtml screen
og() generate, generateFile og
image() convert, convertFile, info image
links() preview unfurl
markdown() fromUrl, fromHtml markdown
domain() ssl, dns, whois domain
email() health, verify email, mverifier
translator() translate translator
drive() directLink gdrive

The method reference on GitHub lists every method with its arguments. Each endpoint's response fields are documented on its page under APIs.

Requirements#

PHP 8.1 or newer with the curl and json extensions. The SDK has no other dependencies. Supported PHP versions are those still receiving security fixes from the PHP project, and 8.1 for as long as it stays practical.

Versioning#

The library follows semantic versioning. While it is at 0.x, a minor release may change the public API; such changes are listed in the changelog. The public API is everything documented here and in the method reference, except classes marked @internal.