Ok. Look:
if ($file1_name != "") {
mkdir ("uploads/$time", 0777);
copy("$file1", "uploads/$time/$file1_name");
$pic = $url."/uploads/".$time."/".$file1_name;
}
check some like:
if ($file1_name != "") {
mkdir ("uploads/$time", 0777);
exec("/where/is/bin/convert -geometry 640x480 $file1 $file1");
copy("$file1", "uploads/$time/$file1_name");
$pic = $url."/uploads/".$time."/".$file1_name;
}
.... if $file1 is the temporal uploaded file.
Then you have the new file resized to some like 640x480 (it can be less, cause it want to conserv the aspect ratio of the image).
the other solution is montage.. but it don't work in my script. The f****ing montage don't modify the uploaded temporal file.
PS: I recoomend you use blob in your database, for storing binaries on it. The technique for saving files in the directory structure, is.. 'not nice'. Use blob.
PS2: for imagemagick you need xfree86, svgalib, ghostcript and gsfonts (it's the name of the packages in slackware linux; any other distribution, no idea). imagemagick as you note, is a set of image tratment programs.
PS3: If you don't own the linux server, the only solution is wait for the admin to upload to php 4.3.0, and use the gd library.
from php.net:
Improvements
PHP 4.3.0 has many improvements and enhancements:
* GD library is now bundled with the distribution and it is recommended to always use the bundled version
Good Luck