1

Is it possible to get data from items that are loaded on scroll with simplehtml parser?

My code is done and it works perfectly I don't need any help with that , I'm just asking for advice if this is even possible to acomplish, I know when the dom praser loads what ever it sees on the first load of the page but is it possible to load more?

Example:

The page that i am loading has 10 items on it. But when you scroll down it Loads 10 more. Or thats not possible?

Frosty
  • 299
  • 5
  • 31
  • of course it's possible. mostly in javascript via ajax. google for "ajax load more" or "infinite scroll" – Jeff Mar 16 '18 at 14:55
  • 1
    SimpleHtmlDom does not parse and run JavaScript code included in the page, it only loads and parses the HTML part, so no, you can't do this if you only use SimpleHtmlDom. – Nima Mar 16 '18 at 15:26

1 Answers1

1

simple-html-dom doesn't do this by itself, you need to study how the javascript on the page fetches new items, and re-implement that in PHP. the "Network" tab of the Developer Tools of chrome is of great help in doing this, rather than study the javascript itself, you can just study the requests created by the javascript when you scroll, i usually find that to be a much easier approach.

hanshenrik
  • 19,904
  • 4
  • 43
  • 89