To create a web thumbnails with PHP script, you do not bother him because it has provided a class that you can use for free or free. Give thanks to Lukasz Cepowski, which has made PHP class for web thumbnail. Feel free to download the script webthumnail.php diwww.phpclasses.org
Script Class webthumbnail made by Lukasz Cepowski utilizes APIs from services webthumbnail.org a site that lets generate a screen shot of a web site.
Once the file has been downloaded webthumbnail.php, then how to use them?
Here is an example script to create web thumbnail or view website capturing and storing the file into a directory capturenya.
capture1.php
<?php require 'webthumbnail.php'; // path file hasil capture $path = 'd:/images/thumb.jpg'; $thumb = new Webthumbnail("http://blog.rosihanari.net"); $thumb ->setWidth(512) ->setHeight(512) ->captureToFile($path); echo "Thumbnail sudah disimpan di ".$path; ?>
or you can also view results capturenya image directly into the browser, simply by making the script as follows:
capture2.php
<?php require 'webthumbnail.php'; $thumb = new Webthumbnail("http://blog.rosihanari.net"); $thumb ->setWidth(512) ->setHeight(512) ->captureToBrowser(); ?>
OK, easy right? good luck with ya ...:
where have webthumbnail.php
ReplyDelete