News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Zend Developer Zone:
Consuming WebThumb's API in PHP
October 17, 2006 @ 13:57:19

On the Zend Developer Zone today, there's a tutorial put together by Cal Evans showing how to use the WebThumb API via a PHP 5 script.

It's a simple service on the surface. You hand it a URL, it gives you back a thumbnail of that web site. At first glance you may think..."ok, why?" The answer to that is of course, "it depends".

He gives examples of reasons it would be needed (designers wanting to show off screenshots of a site or a replacement for Alexa's thumbnailing service) and the code that is needed to make things work. The script asks for the three properties the API needs - a URL for the target site, the height of the browser "window" taking the shot, and the width of this same "window".

Cal show examples of the messages sent back and forth and includes the code for the PHP 5 class to make the request along with some sample usage code. The class makes a basic HTTP request to the API with the XML payload and waits for the response - an estimate of the time for the job and the URL that the results can be found at.

0 comments voice your opinion now!
webthumb consuming xml web service api thumbnail php5 webthumb consuming xml web service api thumbnail php5


blog comments powered by Disqus

Similar Posts

PHPFive.net: Creating a dynamic Google sitemap using the PHP5 SimpleXML extension

Cory Borrow's Blog: Creating thumbs from textfiles with PHP and GD

Davey Shafik's Blog: Sneak Peek: Zend_Service_Server - name and framework subject to change

Jared White\'s Blog: Winning the PHP 5 Framework Wars

DevShed: Constructing Multi-Line PDF Documents with PHP 5


Community Events

Don't see your event here?
Let us know!


php7 example opinion list application symfony framework project series laravel community introduction api interview yii2 podcast programming language composer part2

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework