2 Million Webthumbs
April 23rd, 2008Webthumb generated my 2 millionth web page thumbnail yesterday.
My first million took 564 days
This second million has taken 84 days
The weblog of Joshua Eichorn, AJAX, PHP and Open Source
Webthumb generated my 2 millionth web page thumbnail yesterday.
My first million took 564 days
This second million has taken 84 days
I just upgraded to Wordpress 2.5. I don’t think i like the new admin theme, too much change.
If you see something broken please let me know.
Having fun with my new camera
(Yes I used WebThumb to take the snapshot)
<webthumb> <apikey>keyhere</apikey> <request> <url>http://flickr.com/photos/joshuaeichorn/sets/72157604167994594</url> <outputtype>png</outputtype> <width>1024</width><!-- browser width --> <height>768</height><!-- browser height --> <excerpt> <x>420</x> <y>180</y> <height>80</height> <width>350</width> </excerpt> </request> </webthumb>
With Jen moving in, I’ve been doing a lot of home improvement projects lately.
A couple weekends ago it was building a Dog Garden (Thanks Charles and Alex), then hanging a new door so the dogs could have a doggy door to get the patio and the garden.
Last night it was planting some flowers, I got some nice orange marigolds and some white petunias. Hopefully I didn’t mess anything up too much and they will live.
Microsoft has released information about whats it adding to IE8. The changes for developers look pretty good.
The biggest things I see are:
AJAX wise most of the changes are implementing bug fixes and new APIs from the HTML 5 spec (DOM Storage, firing hashChanged events, XDM).
There also seems to be a new XDR API for making requests to other domains. The API is simple but I’m not sure if the security model is good enough not to cause long term problems. If anyone finds/writes a review of XDR and its security implications please let me know.
A WebThumb drupal module has been added allowing you to easily use WebThumb in a drupal site. I haven’t had a chance to use the module but the code quality looks good.
The WebThumb API docs have been updated. Your feedback on the docs or the API itself would be appreciated.
I would like to make a new version of the API at some point, the goal in that would be to handle errors cleanly as XML responses and too allow for other services to use the same end point. Of course an API update isn’t at the top of my list, I’m going to generate over 200,000 thumbnails this month (compared to 179,190 last month and an average of 61,000 per month last year)
This new demand has put scalability improvements to keep up with the growth as my next job to tackle (after these new docs of course :-).
This Christmas Bluga.net WebThumb has 2 presents for your thumbnailing and web snapping needs.
First is the holiday sale, you can get your credits at a reduced price, so use this opportunity to stock up for your 2008 projects. The other present is some exciting new features.
![]()
Visual effects are currently in alpha and allow you to create a thumbnail with a mirror image below, with a dropshadow, or with a border. There will likely be some small changes to these effects over the next few months. If there is demand I’ll also look into adding more effects and options to the current ones.
Effect thumbnails are 300 pixels wide, and are always PNGs, the effects are designed using transparency so they will work on any background color. Effects are a 2 credit feature. To add an effect thumbnail just add, an effect tag to your request. For example:
<webthumb> <apikey>api key here</apikey> <request> <url>webthumb.bluga.net</url> <effect>dropshadow</effect> </request> </webthumb>
The possible values for the effect tag are mirror dropshadow border
You can fetch the image using the fetch api by using a size of effect
![]()
Support for adding a custom thumbnail of any output size has been added. This is a 2 credit feature and is available by adding a customThumbnail tag to the request with a width and height attribute specified. Note that your exact height and width are used, so if you want to keep the aspect ratio you’ll need to do the match with the browser width/height you specify. For example:
<webthumb> <apikey>api key here</apikey> <request> <url>webthumb.bluga.net</url> <customthumbnail width="120" height="120" /> </request> </webthumb>
You can fetch the image using the api by specifying a size of: custom
You may have noticed that with flash websites, all the flash content isn’t fully loaded before a snapshot of the page is taken. There isn’t an automatic fix for this, since I don’t currently have a method to figure out when flash is done, but an api solution has been added. You can add a delay tag to your request to specify the amount of delay between when the content is loaded by the browser and when snapshot is taken. The default delay is 3 seconds, the maximum delay you can set is 15 seconds.
Example:
<webthumb> <apikey>api key here</apikey> <request> <url>webthumb.bluga.net</url> <delay>2</delay> </request> </webthumb>
Leave comments if you have any questions/feature requests for WebThumb, and don’t forget about the API tester, you can use it to figure out any XML changes without having to write any code.
Last month I had a change to goto Microsofts WebDev07 conference. I haven’t gotten around to doing a write up but Travis did a good one if your interested in what Microsoft has to say to a bunch of PHP guys.
One of the projects I found out about while I was there was fastcgi support in IIS. If your running PHP on windows with IIS this is a pretty big deal since it gives you a stable high performance way to run PHP. I also think its important because its real engineering time by Microsoft on the on project, a real commitment to PHP.
You can grab the bits at: http://www.iis.net/php, this release is fully supported by Microsoft which is also kinda nice.
It would be interesting to see some benchmarks comparing the new fastcgi stuff against your other PHP on windows options, but its doubtful I’ll run them since I run all my production on linux.
I upgraded to Wordpress 2.3.1 yesterday and do to some earlier failed upgrade all my post categories got messed up. Luckily I only have about 300 posts so re tagging everything wasn’t that painful. But word to the wise, if your running Wordpress from SVN use a branch, it was following trunk in the paste that got my database messed up in the first place.
The new WebThumb website has finally been launched. Gone are the days of the super plain website, now were Web 2.0ish.
![]()
WebThumb now has the ability to produce PNGs instead of JPEGs for snapshots. The PNGs are about twice the size of the JPEGs but they offer less artifacts and a much crisper thumbnail. Turning on PNG output makes a thumbnail cost 2 credits, to enable PNG output just add an output_type tag with a value of png. And example is shown below.
<webthumb>
<apikey>apikey here</apikey>
<request>
<url>webthumb.bluga.net</url>
<output_type>png</output_type>
</request>
</webthumb>
I just got done with my PEAR2 unconference talk. It was well attended and I got some good feedback from Derick about the installer and got some interest from Bill Karwin about adding a PEAR channel.
I didn’t really make slides so I don’t have a lot of info to post.
But I do have a list of new features planed(or already implemented) for the Pyrus installer:
1) no installation necessary. It runs out of the box as a .phar. No go-pear.phar needed
2) most packages can be used without installation, and even upgraded later by Pyrus (try then buy scenario)
3) Pyrus is much more development/production-oriented, and will have a “deploy” command for managing deployment of development code to a production server
4) Pyrus is much smaller than PEAR, and consumes far less memory
5) out-of-the-box supported packaging formats include .tar, .tgz, .tbz, .zip, and .phar
6) PHP 5.3+-based code means it fully utilizes cutting edge PHP features such as SPL iterators, XMLReader/XMLWriter, ZIP extension, phar extension (if enabled), exceptions
7) full application support is available with the new www and cfg (configuration file) roles
Pyrus can install just about every PEAR package that uses package.xml version 2.0 without any code change to the PEAR application - you can use Pyrus to manage your PEAR packages as well
I passed the ZCE exam this morning. Wasn’t that hard of an exam, though there was lots of code reading, with little errors to detect.
The conference has been off to a slow start, but i’m in Ilia Alshanetsky’s State of PHP Security talk and it seems that were off to a good start.
The focus of the talk is on the security of the core language, the talk started with the state of PHP security at the beginning of the year. And I think the best way to sum it up is that PHP wasn’t taking a proactive enough approach. The good news is items like the Month of PHP bugs got people to react and things have gotten better.
Improvements:
Automated code analysis (Coverity)
Tests for all security bugs, and lots more tests in general (There is an IBM developer writing 10-20 unit tests a day).
Valgrind memory checking
Code coverage using gcov
Fuzzing
Giving credit to security researchers
The good news is tons of vulnerabilities have been fixed in 5.2.x series. The even better news is most of the vulnerabilities aren’t easily exploitable.
The talk made me feel better about security issues overall, its all part of PHP growing up but I wish PHP would have been taking this more proactive security approach years ago.
Ilia’s slides should be available in the next couple days from his site.
I’m starting my second day here at ZendCon, its the first real day of the conference, yesterday was a tutorial day. There were a lot of good tutorials going on, i spent my time in the Zend Certification crash course since i’m taking the test to get my ZCE today (the test was included free with the conference).
From the crash course the ZCE doesn’t seem to hard if your an experienced php5 developer, but it does seem that you need to pay attention when reading the code examples.
I had a chance to talk with a lot of people last night, it looks like the conference is off to a great start, if your here make sure to look me up.