问题
How could I use imagegrabscreen to get a thumbnail image and a full size image of a specific website.
I was thinking that I could have an array
that I feed the wanted uri's into but I am a bit stuck on how I would set the wxh of the image I need to grab. I also think that I would need a thumbnail class
and a fullimage class
and call them when required.
Any better Ideas?
回答1:
Keep in mind that imagaegrabscreen is Windows-only. If you have multiple displays set up, this function will only grab the primary display. Also, for this to work, your Apache service must be set to Allow service to interact with desktop
otherwise you will just get a blank image.
This discussion covers the use of imagegrabscreen
pretty well: Getting imagegrabscreen to work
There are a lot of other discussions about saving webpages as images, too - here are a few:
- Website screenshots using PHP
- Web Page Screenshots with PHP?
- How can I generate a screenshot of a webpage using a server-side script?
- PHP: How to capture browser window screen with php?
- https://stackoverflow.com/questions/1340917
- What is the best way to create a web page thumbnail?
- Screenshot of current page using PHP
- shell tool which renders web site including javascript
- In any languages, Can I capture a webpage and save it image file? (no install, no activeX)
来源:https://stackoverflow.com/questions/9949074/php-using-imagegrabscreen