How to capture HTML generated by browser with PHP?
I need to parse a webpage that is gen开发者_如何学JAVAerated by JavaScript. So, I need to know if there is a way of capture the HTML generated by a browser with PHP.
I have seen examples of capturing the print screen of a wep page generated by the browser. It is possible to capture the HTML?
Best Regards,
you can't capture it since javascript is processed by the client browser, not the server,
a way to do what you want can be to insert javascript code in page to send the entire html to the server:
if you use jquery you can do it with something like this:
var htmlCode = $("body").html();
$.post("recorder.php", { html: htmlCode } );
精彩评论