chi mi da una mano a fare in modo che questo script possa 'salvare' l'img sul server?

la funzione è presa da questo stesso sito

http://php.html.it/articoli/leggi/93...i-gd-in-php/3/

dove $l è la grandezza dell'img quadrata


Codice PHP:
function OutThumb($src$l){
  
$size getimagesize($src);
  if( 
$size[2] == ){$im = @imagecreatefromjpeg($src);}
  elseif( 
$size[2] == ){$im = @imagecreatefromgif($src);}
  elseif( 
$size[2] == ){$im = @imagecreatefrompng($src);}
  if( 
$size[0]>$l or $size[1]>$l ){
    
$centerX $size[0]/2;
    
$centerY $size[1]/2;
    if( 
$size[0] > $size[1] ){
      
$luy 0;
      
$lux $centerX-$centerY;
      
$rdy $size[1];
      
$rdx $size[1];
    }
    else{
      
$lux 0;
      
$luy $centerY-$centerX;
      
$rdx $size[0];
      
$rdy $size[0];
    }

    if( (
GDVersion() == 2) AND ($size[2] != 1) ){
      
$new imagecreatetruecolor($l$l);
      
imagecopyresampled($new$im00$lux$luy$l$l$rdx$rdy);
    }
    else{
      
$new imagecreate($l$l);
      
imagecopyresized($new$im00$lux$luy$l$l$rdx$rdy);
    }
  }
  else{
    
$new &= $im;
  }
  
header('Content-Type: ' $size['mime']);
  if( 
$size[2] == ){@imagejpeg($new$fileOut100);}
  elseif( 
$size[2] == ){@imagegif($new$fileOut);}
  elseif( 
$size[2] == ){@imagepng($new$fileOut);}
  @
imagedestroy($im);
  @
imagedestroy($new);