Regarding Taking screenshots of websites in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Friends,

   I am new to shell scripting in php.I have got one task like Taking screenshots of websites in PHP.I have found solutions in windows based but I need  in linux and also foind some of the apis which are expensive.I also find some convertion in the following url.

URL :http://www.codediesel.com/php/taking-screenshots-of-websites-in-php/

Can you please let me know how to use functionality in my application.Can you pls let me know step by step where to place snappy and wkhtmltoimage-i386 files and
where to I need to call following code..


Code :

shell_exec('./wkhtmltoimage --quality 50 http://www.bbc.com bbc.jpg');
Below is a short code using ‘snappy’ to take a screen-shot of bbc.com.
<?php   /* Tested on Ubuntu 10.0.4, requires PHP 5.3  */   namespace Knplabs\Snappy;   require_once('Knplabs/Snappy/Media.php'); require_once('Knplabs/Snappy/Image.php');   /* 'wkhtmltoimage' executable  is located in the current directory */ $snap = new Image('./wkhtmltoimage');   /* Displays the bbc.com website index page screen-shot in the browser */ header("Content-Type: image/jpeg"); $snap->output('http://www.bbc.com');   ?>
Please respond as early as possible.I need to submit this task in 1-2 days.

Thanks in advance


[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux