⊗ppPsDyAx 81 of 84 menu

Parsing AJAX in PHP

If a site works via AJAX, then on such a site the content will be loaded after the initial site load. Our PHP parser, of course, will see only the initial HTML code and will not see the dynamically loaded content.

However, we can track the URLs where AJAX requests are sent, and our parser can send requests to those URLs. Thus, we can get the data (most likely in JSON format) and then process it further for our needs.

To see where AJAX requests are sent, you can use the browser's debugger. For this, you need to go to the Network tab and select the 'fetch/xhr' option there.

Open a site that works via AJAX. Track in the browser's debugger where the AJAX requests are sent.

byenru