Witam! Mam taki skrypt, który tworzy mi obrazek:
<?php
function wysokosc($plik) {
$max_width = 500;
$max_height = 400;
$img_width = $img_size[0];
$img_height = $img_size[1];
$ratio_x = $max_width/$img_width;
$ratio_y = $max_height/$img_height;
if($img_width < $max_width && $img_height < $max_height){
$new_width = $img_width;
$new_height = $img_height;
} else {
$new_width = $max_width;
$new_height = ceil($img_height * $ratio_x); }
return $new_height;
}
$rozmiar_czcionki = 10;
Header('Content-type: image/jpeg');
//header('Content-Disposition: attachment; filename="'.$_POST["text"].'_'.$data.'.jpg"');
$obrazekk1 = $_POST["obrazek1"];
$obrazekk2 = $_POST["obrazek2"];
$image1 = imagecreatefromjpeg($obrazekk1);
$image2 = imagecreatefromjpeg($obrazekk2);
$new_width=500;
$new_height = wysokosc($obrazekk1);
$new_height2 = wysokosc($obrazekk2);
$nowy = imagecreatetruecolor($new_width, ($new_height+$new_height2+50));
//obrazek 1
$image_p1 = imagecreatetruecolor($new_width, $new_height);
ImageCopyResampled($image_p1, $image1, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
//obrazek 2
$image_p2 = imagecreatetruecolor($new_width, $new_height2);
ImageCopyResampled($image_p2, $image2, 0, 0, 0, 0, $new_width, $new_height2, $width2, $height2);
//obrazek 3
$im = @imagecreatetruecolor($new_width, 50);
$white = imagecolorallocatealpha($im, 255, 255, 255, 0);
$grey = imagecolorallocatealpha($im, 128, 128, 128, 0);
$black = imagecolorallocatealpha($im, 0, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 500, 50, $black);
$text = $_POST["text"];
$font = '../FW/css/tahomabd.ttf';
$box = imagettfbbox($rozmiar_czcionki, 0, $font, $text);
$x = (int
)abs(($box[2
] - $box[0
])); $y = (int
)abs(($box[1
] - $box[7
]));
$sx=((500/2)-($x/2));
$sy=((50/2)+($y/2))-5;
imagettftext($im, $rozmiar_czcionki, 0, $sx, $sy, $white, $font, $text);
//generowanie obrazka
imagecopyresized($nowy, $image1, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagecopyresized($nowy, $im, 0, $new_height, 0, 0, $new_width, 50, 500, 50);
imagecopyresized($nowy, $image2, 0, ($new_height+50), 0, 0, $new_width, $new_height2, $width2, $height2);
//imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
ImageJpeg($nowy, '', 80);
imagedestroy($nowy);
imagedestroy($img);
?>
Jak zrobić, aby skrypt zapisał mi go w katalogu "zrobione_obrazki" pod nazwą "title_time()"?? nie potrafię do tego dojść :|

Próbowałem z
copy" title="Zobacz w manualu PHP" target="_manual ale nie wychodziło :|
Z góry dzięki za pomoc