There and Back Again

Webthumb Contest

The webthumb API seems to be running pretty stable these days. But it doesn’t have a lot of users yet, so nows your chance to change that.

I’m running a short contest giving out webthumb accounts with higher API limits as prizes. You can win one of these prizes by adding the best webthumb integration to any open source software. One options might be to add a wordpress plugin for making thumbnail links.

The top 5 projects will recieve lifetime accounts with a 5000 per month limit

I will also be giving away 500 per month accounts to anyone who finds a bug in Webthumb and lets me know about it.

To submit your project just add a comment to this message. Also if you need it, I can provider SVN and wiki hosting for any webthumb related projects.

Note:
Base webthumb accounts can generate 250 thumbnail accounts per month.

The only current known bug is that some urls aren’t validated correctly, you won’t get an upgraded account for submitting this again. This is a bug in PEAR::Validate so if anyone is knows of a replacement or wants to figure out exactly what is going on let me know.

28 thoughts on “Webthumb Contest

  1. Joshua Eichorn Post author

    David: A big goal of the contest is too get code written that others can use. But if there is enough interest I can add some seperate prizes for most innovative use of webthumb.

  2. Helgi ├×ormar

    It might be a good idea to submit a bug report to PEAR::Validate to get it fixed instead of just saying on a blog “X doesn’t work in Y” without more explaination

    Just my 2 cents :)

  3. Ivo Jansch

    I was thinking about integrating it in our framework so url fields could have a popup with the thumb of the url entered. However, since it’s a job queue and not realtime, that might prove to be a little less practical (a user would have to wait until the thumb shows up after adding a record). What is the average job response time?

  4. Joshua Eichorn Post author

    About 10-20 seconds, its the sort of process you want to run once, and then store the images locally. If you have an article submission model like a cms does its pretty easy to integrate, im not sure how easy it will be to make work otherwise.

  5. Pingback: Jeff Barr’s Blog » Links for Saturday, September 23, 2006 - Generating Thumbnails of Web Pages

  6. David

    Notice: Undefined index: currentId in /home/htdocs/jeichorn/bluga.net/webthumb/index.php on line 24
    Error, currentId

  7. Jeff Barr

    A couple of things:

    1 – This seems to be broken today; I get the following error when I try to submit a URL to the site:

    Notice: Undefined index: pickup in /home/htdocs/jeichorn/bluga.net/webthumb/index.php on line 35

    2 – I am integrating this into Second Life; see my blog post at http://www.jeff-barr.com/?p=607 .

    3 – This is very cool!

  8. Laurent Yaish

    I wrote a wrapper for the Webthumb API at the same time Hasin was writing his, but he released his first so I didn’t bother with mine.
    I recently made some modification to mine so that it would run without curl installed. A few things still need to be polished before I release it, but I will only bother if someone is interested. So let me know.

  9. Joshua Eichorn Post author

    Laurent:
    I’d be interested, especially if it has a mode for shared polling of multiple requests, and if it looks at the estimate field to decide when to start polling.

  10. Cal Evans

    Joshua,

    Ok, it could be that I’m missing something so feel free to school me. I’ve encountered 4 problems with the API that I’d like to point out.

    1) Why does the XML response come with HTML that gives a 400 error? Am I doing something wrong?

    2) If I submit a payload of urls, the XML that comes back gives me a job id known as “job”. If I submit a check payload, the resulting XML refers to the same identifier as “id”. (ok, it’s not a problem, it’s a nit-pick.)

    3) I would prefer (and maybe it’s just me) that when I request a URL, especially if I specify height and width, that pickup be a link to that image, not to a zip file of all images. (again, I may be doing something wrong) I can work with the zip file but it’s just one more step I have to take to get to the image.

    4) Can we have a test mode so we don’t keep filling up the queue with images of http://www.calevans.com? :) Watermark them if you need to or heck, just send me back a gray box of the right size so the test mode isn’t useful to people but it would be nice if I could test separate from the production system. (and maybe not have my tests count against my monthly allotment?)

    Currently I have a PHP 5 wrapper class that does support multiple submissions. It supports submitting, checking and fetching at the moment. It’s not done yet but by Thursday evening it should be. Next week, I’m going to integrate it into a WordPress plug-in I wrote called Alexify. (http://www.calevans.com/view.php/page/alexify) It will actually replace calls to Alexa and make it so that the calls are made to webthumb and the results are cached locally. Should be interesting.

    Thanks for the great API. You’ve given me hours of amusement. :)

    =C=

  11. Joshua Eichorn Post author

    1) no clue on that, there are some error cases im not trapping and converting into xml, if i can get some details i can fix that.

    2) hmm guess i’ll have to look at that, internally i think its jobId everywhere

    3) height and width are slightly confusing, thats the height and width of the browser not of the output format. I haven’t added custom output format yet. You can easily build urls too the other standard sizes, i guess i should return just the base part of the url for that.

    4) I don’t see me having the chance too add a test mode any time soon, but that seems like it would be a good idea. If you run out of requests let me know, i’ll up your account while your developing.

    Right now the big feature im looking at implementing is a notify API so that i can make a request back to your server when the image is done. I’m getting tired of playing with my firewall daily to stop people with runaway polling code.

    I also want to get custom output sizes implemented, but i have some more C work to do before that an eazy option.

  12. Cal Evans

    Joshua,

    Sorry to be dense but regarding #3, I can’t figure a way to do this. Looking at one of the images generated I see:

    http://bluga.net/webthumb/data/d952/wt45197fb51d952-thumb_small.jpg

    Which breaks down:
    http://bluga.net/
    Not the same as http://webthumb.bluga.net/ which is where the API lives but as long as it’s stable, it doesn’t matter.

    /webthumb/data/
    static

    /d952/
    Not sure what this is. It seems to correspond to the last 4 digits of the job id?

    //wt45197fb51d952-thumb_small.jpg
    This I can compute. Looks like the options are _small, _medium, _medium2, and _large.

    TIA for any help.

    =C=

  13. Joshua Eichorn Post author

    There are 2 urls for accessing webthumb because I have 2 apache’s running on my server one running php4 and the other php5. http://webthumb.bluga.net has a rewrite that should make things work interchangably.

    http://webthumb.bluga.net/data/
    http://webthumb.bluga.net/webthumb/data/
    http://bluga.net/webthumb/data/
    Are all the same place

    Now url wise the pattern is this:
    /webthumb/data/last 4 digits of job id/jobid-thumb_(small|medium|medium2|large).jpg

    Also if you see any errors can you send me the XML payload that generated them (josh@bluga.net) it will help me quickly debug things.

  14. norxh

    Requesting the status of a job before it is completed is returning:
    Cross dependency found in OUTER JOIN; examine your ON conditions

    I’m getting that result until the job is done, then I get the expected jobStatus xml.

  15. Pingback: There and Back Again » Blog Archive » Great WebThumb article on Zend Developer Zone

  16. Pingback: Webthumb: Web ScreenShots at PHP Scripts

  17. Amir Mohammad Saied

    Hi Joshua,
    I think I fixed Validate’s bug, right after your report,
    Lemme know if you’ve still problems with it.

    btw. I’ve a nice idea about the WebThumb, it’s somehow in production stage!
    A firefox extension which adds a “Flickr it!” to the context menu, user will click on it and it’s thumbnail would be sent to his flickr account.
    Just have some problems with Flickr’s API (pooor documentations).

  18. Joshua Eichorn Post author

    Amir: sounds great, send me an email when its ready to go Validate wise i haven’t had any problems lately. There is a option to turn off strict checking, once thats sets things were working fine for me. It seems by default Validate follows an RFC that none of the browsers do, but i guess thats browsers for you.

  19. Adrian Rotea

    Hello Joshua,

    I have found a serious bug in your webthumb web front.

    Imagine the situation when a tumbnail request is made for an URL containing quotation marks, i.e.:

    http://answers.yahooapis.com/AnswersService/V1/questionSearch?appid=YahooDemo&query=cars

    Submitting this url will create the thumbnail but will not be possible to view the job results using the web interface.

    I think an easy fix like removing/replacing the quotation mark from the job url will fix this, but this is just a guess.

    Anyways this bug is very serious and i think an immediate action will be required.

    Regards,
    Adrian

  20. Adrian Rotea

    Hi again,

    It looks like not the quotation marks in url are causing the problems but the ampersands.

    Adrian