Jump to content

Save a picture to the server


Anim9or

Recommended Posts

Hi again,

What would be the best way to save a picture just created to the FTP server in PHP.  Right now I'm using this code:

 

$my_img = imagecreatefromjpeg("images/Goldie.jpg");

$background = imagecolorallocate( $my_img, 0, 0, 255 );

$text_colour = imagecolorallocate( $my_img, 255, 255, 0 );

$line_colour = imagecolorallocate( $my_img, 128, 255, 0 );

imagestring( $my_img, 4, 30, 25, "thesitewizard.com",

  $text_colour );

imagesetthickness ( $my_img, 5 );

imageline( $my_img, 30, 45, 165, 45, $line_colour );

 

header( "Content-type: image/jpeg" );

//imagejpeg( $my_img );

imagecolordeallocate( $line_color );

imagecolordeallocate( $text_color );

imagecolordeallocate( $background );

imagedestroy( $my_img );

Thanks!

 

Link to comment
https://forums.phpfreaks.com/topic/164609-save-a-picture-to-the-server/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.