title: Increasing font size in PHP code and align text in center of captcha image
body: <p>I have a following PHP code which generates and gives me captcha. The captcha code lies on the top left corner of 180x60 background image (fuzzy type captcha background image). And its about 12px in size. I want to bring it to the exect center of the image with font size of 18px or more (adjustable). But, I am not sure how to do it as its very confusing to edit a code like this.</p>
  
  <p>Here is the code.</p>
  
  <pre><code>&lt;?php
      session_start();
      $ranStr = md5(microtime());
      $ranStr = substr($ranStr, 0, 6);
      $_SESSION['cap_code'] = $ranStr;
      $newImage = imagecreatefromjpeg("images/cap_bg.jpg");
      $txtColor = imagecolorallocate($newImage, 0, 0, 0);
      imagestring($newImage, 5, 5, 5, $ranStr, $txtColor);
      header("Content-type: image/jpeg");
      imagejpeg($newImage);
  ?&gt;
  </code></pre>
  
  <p>Any help would be appreciated. Thank you!</p>