title: url shortener modification
body: <p>Im working with a php url shortener and my problem is that it only creates the MAX number of shortening codes up to 2 characters (eg domain.com/XX). I want it to go up to 5 characters (eg domain.com/XXXXX)</p>
  
  <p>I believe i found the relevant code, but im not sure how to change it to allow for this modification</p>
  
  <pre><code>function decode_url_id($code)
      {   
          $scheme = "abcdefghijklmnoprstuqwxvyz0123456789ABCDEFGHIJKLMNOPRSTQWXUVYZ";
          $scheme_size = strlen($scheme);
  
          $number  = 0;
          $code_size = strlen($code);
          $code = strrev($code);
          for($i = 0; $i &lt; $code_size; $i++)
          {
              $digit_value = strpos($scheme, $code[$i]);
  
              $number += ($digit_value * pow($scheme_size, $i));
          }
  
          return $number;
      }
  
      function encode_url_id($number, $code="")
      {
          $scheme = "abcdefghijklmnoprstuqwxvyz0123456789ABCDEFGHIJKLMNOPRSTQWXUVYZ";
          $scheme_size = strlen($scheme);
  
          if ($number &gt;= $scheme_size)
          {
              $c = $number % $scheme_size;
              $code .= $scheme[$c];
              $number = floor($number / $scheme_size);
  
              return encode_url_id($number, $code);
          }
          else 
          {
              $code .= $scheme[$number];
              $code = strrev($code);
          }
  
          return $code;
      }
  </code></pre>
  
  <p>Am i barking up the wrong tree?</p>