title: Upload, resize, and crop center of image with PHP
body: <p>I'm wanting to create a very very basic upload, resize, and crop PHP script.
  The functionality to this will be identical (last i checked anyway) to the method Twitter uses to upload avatar pictures.</p>
  
  <p>I want the script to take any size image, resize the shortest side to 116px, then crop off the top and bottom (or left and right side if it's landscape) as to get a square 116px by 116px.</p>
  
  <p>I don't want a bloated PHP script with client side resizing or anything, just a simple PHP resize and crop.  How is this done?</p>