i want to take a screenshot of HTML5 banner page and save as jpg file. the problem is if i use CURL it gives me blank page, because the HTML5 banner take 2-3 seconds to render the contents. my questions are is there any possibility screenshot using CURL PHP Should i use some API to get the screenshot, then which one Can achive using linux commands
Asked
Active
Viewed 398 times
2 Answers
2
You could use PhantomJS (a headless browser) to open your banner. BUT PhantomJS is not a fully implementation of a Desktop Browser (like Chrome). So features like Video won't work.
In that case, you can use Selenium WebDriver to open and get a screenshot, but you need to have X server, or use xfvb.

Lucas Katayama
- 4,445
- 27
- 34
1
You need to use a library to do that, CURL would only return the source code but without rendering.
CutyCapt does the job

Jad Joubran
- 2,511
- 3
- 31
- 57