bannerify/bannerify is the Bannerify client for PHP 8.1 and later. It uses Guzzle and returns errors as values, so a failed request does not throw.
Install
Create a client
You need an API key. Create one on the API Keys page of the dashboard and keep it on the server.Generate an image
$result['result'] is a string that holds the image bytes.
Methods
Create images and PDFs covers the first three, Render videos covers the video methods, and Signed URL covers the last one.
Handle errors
Every method exceptgenerateImageSignedUrl returns an array with a result key or an error key, and never both.
docs links to the page for that code, and you send requestId to support when you need help with a request. Errors lists the codes.
The SDK creates a few errors itself. They have code, message, and docs, but no requestId.
generateImageSignedUrl returns a string and throws InvalidArgumentException when the format is not supported.
Options
Learn more
- Generate dynamic images in PHP: render banners and product images with cURL or this SDK.
- Dynamic invoice PDFs from JSON in PHP: fill a table from your billing data and get a hosted PDF link.