Category: "PHP"

PHP Abstract Base Class - Including validation

An example of a base class. Sample extension and call for instantiation: PHP<?phpclass Course extends Base {         public function __construct($properties) { &#1… more »

PHP filter_var_array Example

This is a very simple PHP contact form validation script. It fails silently, based on the expectation the client is validating the data prior to submitting it. In this case, if the server receives invalid inputs, inputs with invalid data, or a data se… more »

PHP - ImageMagick command line Pie Chart

This code was converted from a bash version to create pie charts. It is much faster and does not require bc on the server. PHP is used to create the ImageMagick command line. This code creates pie chart and legend images which can then be placed on a… more »

eZ Publish Workflow - electronic media delivery

I'm helping on a site that sells music. I wanted a way to bundle a person's purchases into a single file that could be downloaded once. There are two types of electronic media, mp3_product and album. Each may have an image associated with it. An m… more »

Installing ffmpeg-php on CentOS 5.8

Follow the instructions in the link above, they're excellent. If you get a few compile errors related to missing files, add these RPMs (excerpt from /var/log/yum.log): faad2-devel-2.7-1.el5.rf.i386 x264-devel-0.0.0-0.4.20101111.el5.rf.i386 lame-… more »