J
J
JamesBondMax2022-04-16 01:46:48
PHP
JamesBondMax, 2022-04-16 01:46:48

How to parse a document inside an iframe using phpQuery?

Good evening.
I have an html page with the following structure:

<html>
<head></head>
<body>
.....
<iframe>
#document
<html>
<head></head>
<body>
<div id="findme">

</div>
</body>
</html>
</iframe>
</body>
</html>


How can I use phpQuery to get to the div#findme element?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TheAndrey7, 2022-04-16
@JamesBondMax

No, because the iframe tag inside is always empty, the src attribute needs to be parsed. This inspector in the browser shows you the tree inside it beautifully.
ps The original HTML source on Ctrl+U opens - this is exactly what your script receives from the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question