انظر سكريبت AR IMG-uploader المطروح هنا برمجة Fnan4arab
لكنك ستحتاج مكتبة ال GD
--- الكود ---
كود PHP:
$CONFIG['main']['text2write'] = "اكتب هنا ما تريده"
$in = imagecreatefromjpeg ($_FILES['file']['tmp_name']);
$in_x = imagesx($in);
$in_y = imagesy($in);
if ($in_x >= 264 && $in_y >= 105) {
$x_size = 0+imagesx($in);
$y_size = 20+imagesy($in);
$im = @imagecreatetruecolor ($x_size, $y_size);
$background_color = imagecolorallocate ($im, 0, 0, 0);
$text_color = imagecolorallocate ($im, 255, 255, 255);
imagestring ($im, 5, $x_size/2-(strlen($CONFIG['main']['text2write'])*3)-20, 5+imagesy($in), "".$CONFIG['main']['text2write']."", $text_color);
imageline ($im, 0, imagesy($in), imagesx($in), imagesy($in), $text_color);
imagecopymerge ($im, $in, 0, 0, 0, 0, $x_size, imagesy($in),100);
} else {
$im = $in;
}
imagejpeg ($im,"pics/$userinfo[id]/" . $_FILES['file']['name'] . "");
imagedestroy ($im);