How to create Ogg videos in Linux

Ogg Theora is the codec most supported by modern HTML5-capable browsers, so how can you convert your videos to it? Pretty easily, it seems. There’s a cross-platform command-line application called ffmpeg2theora which does a good job of converting videos to Ogg Theora. Usage couldn’t be simpler: ffmpeg2theora input.mpeg If the audio is out of sync with the video, … Continue reading How to create Ogg videos in Linux

How to do alphanumeric validation with PHP

Hardly worth a whole blog post but it may help somebody… is_numeric() is the function to use for validating numeric-only user input with PHP but unfortunately there is no is_alphanumeric(). Or so I thought. Meet ctype_alnum() Here’s an example of its usage: if (ctype_alnum($_POST['username'])) { echo "Thanks - that's a good username."; } else { … Continue reading How to do alphanumeric validation with PHP