0

First of all i'm not english, so sorry if this isn't easy to understand.

I need get the html content of a div in HTML. This question is very common, and I think that I know how do it, but I have a problem getting the html source.

The page looks like this:

<!doctype html>
<body class="foo">
    <div id="blah"></div>
    <div id="blah"></div>
    <div class="page">
        <table id="layout">
              <div class="I_Want_This"></div>
        </table>
    </div>
</body>

The problem is: I'm pretty sure that the part that I want is generated with javascript, so when I try to get the div I can't find it (because not exists yet).

In short: I need to get the page HTML source after run any javascript code in the page. ¿Is this possible with PHP?

Edit: the page is this, I want to retrieve the /div class="members"/ content...

4
  • The code that will find w.e HTML should run at the bottom, after everything has loaded. Have you tried that? Commented Dec 26, 2015 at 21:54
  • can you show us the javascript part of your code? Commented Dec 26, 2015 at 21:58
  • @Avik updated with the link Commented Dec 26, 2015 at 23:32
  • @SardàBonaire You can use jquery ajax to get certain part of the page, in this case you can use something like: $( "#result" ).load( "ajax/test.html .members" ); now replace the #result with the div id where you want the content to show. I don't get the PHP part though. Maybe if you make your question a bit more clear, it will be easier to understand. Commented Dec 27, 2015 at 5:10

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.