I am trying to fetch a page source. The page source generated with Javascript. FOR EXAMPle :
document.write(“<div>SAMPLE TEXT</div>”);
When i see the html source with firefox firebug. It shows div in the body tag however by viewing the source code by View->Page source it just shows the javascript code.
To fetch the page i am using simplehtmldom parsar however it is not working it is also fetching javascript code.
Please help me to suggest any other alternative or suggestion about this.
Adding HTML from JavaScript using document.write does not update the DOM. You need to use the correct JavaScript DOM commands to update the page if you want the DOM to be updated as well as what displays on the page.
What I believe he wants, is to be able to use PHP to retrieve the contents of a web page, after that web page has processed and rendered its scripting.