Posts tagged with: PHP

Check for broken MP4 file in PHP on Linux


I’m working on a project where MP4 files are FTPd over to a different server. This server’s job is to add a front and end bumper to the video clips automatically and host for user pickup. I needed to find a way to ensure that the source video had finished transferring and was complete before starting the process.
Continue Reading

Textlocal SMS to MySQL Database in PHP

Here’s a real simple piece of PHP code that receives an SMS from Textlocal’s service and saves it to a MySQL database. This can be very handy for text-to-screen applications or if you just want to keep a custom database of received messages. Textlocal gives the option to forward incoming messages to a URL and provides sample code to get you going. The code I’ve written code below takes this one step further and will save the messages to a database. Once received SMSs are stored in the database it is really easy to create moderation tools and further analyse the messages.

Continue Reading

Getting and displaying album artwork using Last FM API in PHP

As I’m a general all-rounder tech guy at my current job, I often find myself needing to learn new stuff pretty quickly. Recently I’ve been working on a jukebox system for our office where anyone can request a song, view the currently playing song etc.

A nice finishing touch I wanted to add was to display the album artwork of the currently playing song. I knew I needed to use the Last FM API but I found it really hard to get pointed in the right direction. I’d never used any kind of API before so was completely in the dark.

To help anyone else that may be in a similar situation, here’s a little guide of how to get started with the Last FM API in PHP.
Continue Reading