Exempting pdf, doc, and xls from screen grab utility
<p>I'm using the following code and an open service provided by wordpress to grab a screenshot thumbnail of a number of webpages on the fly</p>

<pre><code>&lt;img alt="&lt;?php the_title(); ?&gt;" src="http://s.wordpress.com/mshots/v1/&lt;?php echo urlencode( get_post_meta(get_the_ID(), 'mjwlink-url', true )); ?&gt;?w=300"&gt;
</code></pre>

<p>Problem is some of the links go to PDF, DOC or XLS files, in those cases I'd like to display a single alternative image.</p>

<p>I have absolutely no idea how to go about using the url in this way + given the fact I'm using <code>urlencode</code> I'm not sure it's even possible - any tips/advice/code appreciated.</p>

<p>Example outputs:
<a href="http://s.wordpress.com/mshots/v1/http%3A%2F%2Fwww.reform.co.uk%2Fportals%2F0%2Fdocuments%2Fitcanbedonesingle.pdf?w=300" rel="nofollow">http://s.wordpress.com/mshots/v1/http%3A%2F%2Fwww.reform.co.uk%2Fportals%2F0%2Fdocuments%2Fitcanbedonesingle.pdf?w=300</a></p>

<p><a href="http://s.wordpress.com/mshots/v1/http%3A%2F%2Fwww.outoftrouble.org.uk%2F?w=300" rel="nofollow">http://s.wordpress.com/mshots/v1/http%3A%2F%2Fwww.outoftrouble.org.uk%2F?w=300</a></p>
