THESE CODES ARE PROVIDED FOR AN EXAMPLE OF HOW TO USE IMAGEMAGICK WITH PHP. CARE SHOULD BE TAKEN WHEN ACCEPTING USER INPUT.
I TAKE NO RESPONSABILTY FOR ANY PROBLEMS THAT MAY OCCURE WHEN USING ANY OF THIS CODE.
IT IS UP TO YOU TO SECURE THE CODE AND VALIDATE USER INPUT.
// Create the first gradiant
exec("convert -size 100x40 gradient:orange-yellow gradiant1.png");
// Create the second gradiant
exec("convert -size 100x40 gradient:yellow-orange gradiant2.png");
//Join the two gradiants into one image
$cmd = " -background none gradiant1.png gradiant2.png -append ";
exec("convert $cmd double_gradiant.jpg");
// Delete the tempory images
unlink("gradiant1.png");
unlink("gradiant2.png");