0

I am working on web crawler and i found some of the website populate their content by JSON. This makes me hard time to get the data using SIMPLE HTML DOM. Is there any way to get the final HTML Code that I could able to see in the inspect element?

dharanbro
  • 1,327
  • 4
  • 17
  • 40

1 Answers1

0

This is not a trivial task. You'll need to use a "headless browser" and actually execute the JavaScript on the page. There are several headless browser implementations out there to choose from (just search on the term); then, of course, you'll have to drive them from PHP.

T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875
  • yeah i heard about that in google. But i couldnt get the procedure to do it in PHP. Could you please help me regarding it? – dharanbro Oct 20 '14 at 09:06
  • @DharanBro: I've never had to drive a headless browser from PHP. This (closed) question may (or may not) help: http://stackoverflow.com/questions/6578132/php-headless-browser – T.J. Crowder Oct 20 '14 at 09:07