OK, the title is vague but i just dont know how to word this.
what I want to do is parse the entire page before rendering, then select a certain div from the page using Simple HTML DOM PHP and render that instead of the entire page, if the header
of the page matches through if(isset($_SERVER[]
call
Trouble is, i dont know how to do it, i cant select the current page using PHP (using $_SERVER[]
?). I dont even know if I'm making sense.
say we start with how the external library works:
$html = file_get_html(''); // Get HTML of this page.. somehow
$div = $html->find('div[id=mainContent]'); // or 'div#mainContent'
But how do I echo the contents of that div? and will this render the page first?
Can anyone help me?