Code snippets for symfony 1.x


Refine Tags

Snippets tagged "sfthumbnailplugin"

download images with sfWebBrowserPlugin

Download an image via sfWebBrowser and save it as-is or turn it into a thumbnail.

$b = new sfWebBrowser();
// create thumbnail
$thumb = new sfThumbnail(150, 150);
$thumb->loadData($b->getResponseText(), $b->getResponseHeader('Content-Type'));
// just store the file - don't make thumbnail
file_put_contents('/home/foo/bar.gif', $b->getResponseText());
by Benjamin Meynell on 2007-09-15, tagged sfthumbnailplugin  sfwebbrowserplugin