A client of mine wanted a way to highlight text on a page as audio was playing, thus helping children that had difficulties reading along. In this tutorial I will show you the solution I implemented.
The code makes use of the timeupdate event and it uses the data from the JSON to sync audio with the text.
Read Full Article...Today we're going to learn how to use the GD Library to merge 3 or more png files into one while preserving transparency
We start with 3 png files that look like the ones below and what we want to achieve is a fourth image that represents the 3 initial png files one on top of the other, while preserving their transparency.
The tricky part when mixing png files is keep the transparency or alpha levels intact. To do that you need to know that when creating an image resource in PHP you have to make it "remember" the alpha state and fill the new resource with a transparency by using the imagecolorallocatealpha() function.
Read Full Article...Many hosting providers use cPanel and this tutorial comes as a helper for those of you who need to manage various server aspects with PHP. I will show you how to create new sub-domains, databases and email accounts on a cPanel driven server, from your PHP code.
Read Full Article...A few days ago a client asked me if I could send out emails with attachments using client side code only. At first I laughed, asking myself why would anyone want to do that, but then I thought: "Who cares! Whatever the client wants!". In the end I did find out that this was caused because of the hosting environment that he used which didn't allow any type of server-side code to be executed (Sooo weird!).
Read Full Article...
DD is a Unix and Unix-like utility that is primarily used to convert and copy files.
One really useful use-case for dd
is that it can "pack" entire partitions into one single image file, thus allowing users to recover entire disks by "unpacking" and restoring a file-system in case of hardware failure.
To create a full backup for a partition the command you need to run is straight-forward. The size of the resulting image file will be the same as the size of your partition so make sure you have enough free space on the drive you are placing your backup... also, please avoid placing your image file on the same drive that you're backing up.
Read Full Article...