What i am trying to do is to capture screenshot of URL submitted by user and using http://open.thumbshots.org/image.aspx?url=http://google.com . The problem is, if for any reason screenshot don't get captured(as user can enter invalid url), what i get is default image of open.thumbshots.org saying "thumbshots.com Image coming soon" . How can i show my default image instead of that image in case of failure?
$url = $_POST['user_url'];
and html
<img src="http://open.thumbshots.org/image.aspx?url=<?php echo $url;?>" width = "180" height = "150" />
Here i need to decide before showing image, if returned image is default image of thumbshots, display my default image
I am not entirely familiar with this particular service, and you haven't given us any code you are using to go on, but my guess is you have a few options:
Personally, I really like CutyCapt because I can guarantee it's performance on my own servers and it's pretty easy to use. But I don't know what your setup is like or what you've tried already, so it may not be possible for you.
If you are set on using thumbshots.org, I would suggest checking the headers, as that seems pretty consistently correct (although I've admittedly spent very little time checking).