print_screen
print_screen($filepath,$xl=-1,$yt=-1,$xr=-1,$yb=-1,$as_gray=false); - take a screenshot of the current page (visible part)
the input Function accepts parameters:
$filepath – path to the file where the screenshot will be saved (bmp, png,gif,jpeg formats are supported)$xl – x - coordinate of the upper-left corner of the page for the screenshot (at -1 - from the beginning of the page)$yt – y - coordinate of the upper-left corner of the screenshot page (at -1 - from the beginning of the page)$xr – x - coordinate of the lower-right corner of the screenshot page (at -1 - to the end of the page)$as_gray – specifies to take a screenshot in gray (true), available from version 7.0.6
After testing, the function returns the result of its work to the script :
true – failed to save the screenshot to the specified filefalse – failed to save the screenshot to the specified file