How to capture website screenshot with PHP

0
135

Welcome back to shortlearner.com, In our previous post we learn how to insert a form data into a file.

Today we learn how to capture website screenshot by using PHP inbuilt functions.

PHP provide us a function called imagegrabscreen 

this function help us to Grabs a screenshot of the whole screen.

How to capture website screenshot with PHP

Also Read : Shutdown system using PHP script.

Print numbers from 1 to N without using loop in PHP.


Import data from text file to MySQL using PHP.

Check PHP Script execution time measure.

Create a dynamic Calendar Using PHP.

<?php
$im = imagegrabscreen();
 $imagename= rand(10,100).('.png');
imagepng($im, $imagename);
imagedestroy($im);
echo "Screenshot Sucessfully Taken, Check Your Directory";
?>

here we use rand() function to save image with unique name.

Also Read : How to create a facebook like chat system using PHP ,AJAX and MySQL.

Send Mail Without SMTP Authentication in PHP.

Create a dynamic progress-bar using PHP.

Generate Enrollment-number using PHP.

Decode JSON format using PHP function