Can I rotate a image using a php code? Help needed with the php code?

Member Avatar

GD library:

From the manual:

// File and rotation
$filename = 'test.jpg';
$degrees = 180;

// Content type
header('Content-type: image/jpeg');

// Load
$source = imagecreatefromjpeg($filename);

// Rotate
$rotate = imagerotate($source, $degrees, 0);

// Output

You need the manual. Download a copy - it'll save you hours of pointless forum posting.