$ratio2) { $thumb_w=$new_w; $thumb_h=$old_y/$ratio1; } else { $thumb_h=$new_h; $thumb_w=$old_x/$ratio2; } // we create a new image with the new dimmensions $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h); // resize the big image to the new created one imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y); // output the created image to the file. Now we will have the thumbnail into the file named by $filename if(!strcmp("png",$ext)) imagepng($dst_img,$filename); else imagejpeg($dst_img,$filename); //destroys source and destination images. imagedestroy($dst_img); imagedestroy($src_img); } // This function reads the extension of the file. // It is used to determine if the file is an image by checking the extension. function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } function is_valid_email($email) { $result = TRUE; if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email)) { $result = FALSE; } return $result; } function destroy($dir) { $mydir = opendir($dir); while(false !== ($file = readdir($mydir))) { if($file != "." && $file != "..") { chmod($dir.$file, 0777); if(is_dir($dir.$file)) { chdir('.'); destroy($dir.$file.'/'); rmdir($dir.$file) or DIE("couldn't delete $dir$file
"); } else unlink($dir.$file) or DIE("couldn't delete $dir$file
"); } } closedir($mydir); } ?> Arthur John Charles
  Arthur John Charles - Land Rover Birmingham  
 
Arthur John Charles - Land Rover Birmingham Arthur John Charles - Land Rover Birmingham Arthur John Charles - Land Rover Birmingham Arthur John Charles - Land Rover Birmingham Arthur John Charles - Land Rover Birmingham
 
Land Rover Birmingham
Land Rover Birmingham
Landrover Birmingham
Land Rover Discovery Birmingham
Land Rover Birmingham Parts
Land Rover Birmingham Accessories