DBookatay Posted February 16, 2008 Share Posted February 16, 2008 I know this question has been asked over and over again, hence the title... I am trying to find a script that will do 3 things: 1.) Resize the image to 365x274 and upload it to a specified directory 2.) Create a thumbnail of the same image at 90x45 and place it in a different directory 3.) Rename both images, based on $_GET ($stock= $_GET[stock] I've found scripts that will upload images (and even created one), or/and make a thumbnail, or/and rename images, but nothing that will do all 3. Plus most of the thumbnail create scripts seems to strip a lot of colors out of the images, making them not as attractive. Does anyone know a good place to look code examples, or have a good script in thier code library? Quote Link to comment Share on other sites More sharing options...
DBookatay Posted February 16, 2008 Author Share Posted February 16, 2008 Anyone? Quote Link to comment Share on other sites More sharing options...
phpSensei Posted February 16, 2008 Share Posted February 16, 2008 You can just do /////////// THUMBNAIL <img src="image.png" height="90" width="90" /> /////////// IMG <img src="image.png" height="365" width="274" /> and for your other question bool rename ( string $oldname , string $newname [, resource $context ] ) http://ca.php.net/rename <?php $new_name = $_GET['stock']; rename("/tmp/tmp_file.txt", "/home/user/login/docs/".$new_name); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.