title: How to generate image dimensions at random in PHP?
body: <p>I want to generate some random placekitten urls like so:</p>
  
  <p><a href="http://placekitten.com/200/300" rel="nofollow">http://placekitten.com/200/300</a></p>
  
  <p>To use as paceholders on the site I am developing at the moment. The images must be no smaller than 100px and no larger than 250px in width. I am generating the widths like so:</p>
  
  <pre><code>$width = mt_rand(100, 250);
  </code></pre>
  
  <p>But I am not sure how to generate the height. The height should be of the proper aspect ratio based on the random width that was generated. How to do that?</p>
  
  <p>Ultimately the goal is:</p>
  
  <pre><code>$thumb = "http://placekitten.com/$width/$height";
  </code></pre>