Results 1 to 2 of 2

Thread: PHP: DOM-Document: need help to apply this

  1. #1

    Default PHP: DOM-Document: need help to apply this

    Hi Folks, good day

    I am trying to scrape the price data from a webpage, but how to get the variable,

    see here the target see the target - click the url here

    Code:
    include 'simple_html_dom.php';
    $html1 = file_get_html('http://www.buergerstiftungen.de/cps/rde/xchg/SID-635E10F9-BFA1A4BF/buergerstiftungen/hs.xsl/db.htm');
    
    $info1 = $html1->find('b[class=[what to enter herer ]',0);
    
    The variable then also contains data such as
    
    <b class="info"> info </b>
    Is there a way to trim the unwanted data out ? I just need all the infos out of the site. I am unsure if I do it during the find, or perhaps when i echo out the variable, then do I specify what I want?

    well how t o do it witout a regex but with DOM-Document!?

  2. #2
    Join Date
    Aug 2008
    Location
    Behind the 8 ball
    Posts
    116

    Default Re: PHP: DOM-Document: need help to apply this

    I don't know about DOM-Document but this might work.

    Code:
    include 'simple_html_dom.php';
    $html1 = file_get_html('http://www.buergerstiftungen.de/cps/rde/xchg/SID-635E10F9-BFA1A4BF/buergerstiftungen/hs.xsl/db.htm');
    
    $info1 = $html1->find('b[class=[what to enter herer ]',0);
    echo strip_tags($info1);

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •