views:

17

answers:

0

Hi!

First, sorry for poor title...

I'm working to get some text out of another page and I got one step working by narrow down the source but I have trouble narrow it down more.

My code:

<?php
include('simple_html_dom.php');

$html = file_get_html('https://www.*.org/sok/quote=*');

echo "<b>find all div tags with posts id</b><hr>";
foreach($html->find('div#posts') as $e)
{
    echo $e->innertext . '<br>';
}
?>

The source I get from my code: http://beta.yapaste.com/f6

The wanted output:

Forum: <a href="/f53">Vapen och militär</a>
Time: 2010-08-01, 14:52
Title: <a href="/t1247652"><strong>Pyramidbild av det militära?</strong></a>
Post: <a href="/p24569145#p24569145">krigsskola var fänrik och löjtnantsskola innan...</a>

And for all <table class="p4">

But this seems like an impossible task for me, I appreciate all answers who just could point me in the right direction.

Thanks!