PHP

Footer for a picture or photo with ImageMagick

Snippets 20:09 / 05.07.2021

Recently in one of the chats a task on ImageMagick was discussed, which I found interesting, due to the fact that it was considered to be difficult and there were no ready similar solutions.

Briefly, the task was as follows: you need to write a script that will use ImageMagick to add a footer to a photo or image. And this footer should not overlap the original image, but be added at the bottom by the width of the processed image. The footer (black) should have a logo (static) and two labels (white) with the ability to choose any fonts for these labels.

I've never had any experience with ImageMagick for PHP before, as for my tasks I was satisfied with the capabilities of GD library. I wanted to solve this task, and with the ready solution I'm sharing in this publication.

34

New version of CurlWrapper (v1.1.0) - OOP wrapper for cURL

My scripts 15:51 / 05.07.2021

You can read more about CurlWrapper, a small and simple OOP wrapper for PHP cURL with no overhead, in this publication.

The new version (v1.1.0) adds functionality for setting basic configuration parameters:

  • User-Agent
  • Timeout
  • Referer

17

CurlWrapper - the simplest OOP wrapper for PHP cURL

My scripts 16:00 / 10.06.2021

About CurlWrapper library

CurlWrapper – the simplest OOP wrapper for PHP cURL with no overhead.
Designed to test and work with simple RestFull and JSON APIs and execute simple queries.

No advanced settings, just a minimum set of options needed to initialize cURL and perform simple queries with different headers. Writing similar code can be done in minutes, but sometimes you want to have a ready-made library for simple tests so you don't waste time.

29