yepster123 Posted September 9, 2007 Share Posted September 9, 2007 I made the script below, this script merges too images together to create one image, this part isnt important. At the end of the script it says "imagepng($image); ". This outputs the final image and shows it on the screen which is good. But after this I want the script to upload the final image to my server, how would i do this? The code: <?php header('content-type: image/png'); $watermark = imagecreatefrompng('watermark.png'); $watermark_width = imagesx($watermark); $watermark_height = imagesy($watermark); $image = imagecreatetruecolor($watermark_width, $watermark_height); $image = imagecreatefromjpeg($_GET['src']); $size = getimagesize($_GET['src']); $dest_x = $size[0] - $watermark_width - 2; $dest_y = $size[1] - $watermark_height - 25; imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, 100); imagepng($image); ?> The path I want the new image to be uploaded to is: /home/content/m/a/n/manage23/html/Stamped/ I just dont know how to do it. I hope thats enough details provided for you to help me Thanks Link to comment https://forums.phpfreaks.com/topic/68586-need-help-with-this-file-uploading-php-script-example-of-my-script-included-an/ Share on other sites More sharing options...
BlueSkyIS Posted September 9, 2007 Share Posted September 9, 2007 Read the manual for imagepng: http://us3.php.net/imagepng bool imagepng ( resource image [, string filename [, int quality [, int filters]]] ) Send the image to a file instead of to the browser. Link to comment https://forums.phpfreaks.com/topic/68586-need-help-with-this-file-uploading-php-script-example-of-my-script-included-an/#findComment-344782 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.