Una solucion consiste en tener instala la libreria GD (mira en tu phpinfo si la tienes instalada).
Si la tienes, simplemente debes usar la funcion
imagerotate (busca la info de esta funcion de php gd).
Código PHP:
<?php
// The file you are rotating
$image = 'myfile.jpg';
//How many degrees you wish to rotate
$degrees = 180;
// This sets the image type to .jpg but can be changed to png or gif
header('Content-type: image/jpeg') ;
// Create the canvas
$source = imagecreatefromjpeg($image) ;
// Rotates the image
$rotate = imagerotate($source, $degrees, 0) ;
// Outputs a jpg image, you could change this to gif or png if needed
imagejpeg($rotate) ;
?>
Un ejemplo extraido de un sitio gringo xD
Muak