title: Laravel mime type guessers alternative
body: <p>My validation rules,</p>
  
  <pre><code>// Get request input
  $caption = Request::input('caption');
  $photo = Request::file('photo');
  
  // Request validation
  $validator = Validator::make(
          [
              'caption' =&gt; $caption,
              'photo' =&gt; $photo
          ],
          [
              'caption' =&gt; 'required',
              'photo' =&gt; 'mimes:jpeg,jpg'
          ]
      );
  
  // If validation fails
  if($validator-&gt;fails()) {
      return redirect()-&gt;back()-&gt;withInput()-&gt;withErrors($validator);
  }
  </code></pre>
  
  <p>Error!</p>
  
  <blockquote>
    <p>LogicException in MimeTypeGuesser.php line 127: Unable to guess the
    mime type as no guessers are available (Did you enable the
    php_fileinfo extension?)</p>
  </blockquote>
  
  <p>I know the solution is to enable <strong>extension=php_fileinfo.dll</strong> in the php.ini settings. </p>
  
  <p>But I am on a shared hosting and I have already talked to the server administrator to enable the extension. Unfortunately, they rejected my request showing some of the security reason.</p>
  
  <p>Is their any alternative so I can validate my images?</p>