1

I use PHP script to send POST DATA variables to URL and then URL responses a HTML string. How can I capture screenshot of HTML string above as it's displayed on browser. It is the best solution if i don't need send 2 POST requests, one for HTML content and one for screenshot.

UPDATE: add more information. My website crawls html content from other website (by sending POST data to it and then get its response). It is only a string of HTML. Beside, I want to get a screenshot of this response that it's shown on browser as what end-user can see. All action is done in server-side.

Huy - Logarit
  • 634
  • 8
  • 13

2 Answers2

0

The best way to do that is to capture through javascript and send it to the server-side. you can do that in a local code that. check out this following example (HTML2Canvas): http://html2canvas.hertzen.com/screenshots.html

gil.r
  • 13
  • 2
0

Try this. I hope it help :), you should setup proxy service with node.js or php or more to capture a website :) from url

HTML2Canvas http://html2canvas.hertzen.com/screenshots.html

proxy service

https://github.com/niklasvh/html2canvas/wiki/Proxies

HoangHieu
  • 2,802
  • 3
  • 28
  • 44