help with simple html DOM

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
silverbullet
Forum Newbie
Posts: 5
Joined: Fri Oct 02, 2009 7:40 pm

help with simple html DOM

Post by silverbullet »

Hello, I'm trying to use simple html DOM to extract everything inside the tags on a html page with the class "site point". Here is my code that doesn't work:

Code: Select all

<?php
include_once('simple_html_dom.php');
 
$html = file_get_html('examplewebsite');
$ret = $html->find('.site point')->innertext;
echo $ret;
 
?>
Below is an example of one of the site point tags (there are ten or so) with the information inside which I want.

Code: Select all

<dl class="site point">
<dd class="thumbnail">
<a href="blabla" ></a><a href="/toolbar/sidepanel.php?url=random.html" >Get This      Now</a>   </dd><dt class="notext"><a href="/to/" >Title</a></dt><dd class="starts">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td class="textUncolor"> CUT OUT SOME IMAGES AND       ADDRESSES HERE
                            </td></tr>
</table>
</dd>
</dl>
Can anyone be kind enough to help me get it working, I have been playing around with this all day with little success.
Post Reply