0

hi all,

I have a scrap working but it also brings the restred trade mark.

I have permission from the company to do this.

How do i strip these out?

// get simple_html_dom from http://simplehtmldom.sourceforge.net/
include_once('simple_html_dom.php'); 


// @todo change $url for form input
$url = "";

$html = file_get_html($url);

// look for ul tags inside DIV with id ProductDetail
$ul = $html->find('div[id=ProductDetail] ul');
// look for h1 tags inside DIV with id ProductDetail
$h1 = $html->find('div[id=ProductDetail] h1');
// look for span tag with discription class inside DIV with id ProductDetail
$det = $html->find('div[id=ProductDetail] span[class=discription]');

foreach($h1 as $header1){
    echo $header1 ."<br/>";
}
foreach($det as $detail){
     echo $detail . "<br/>";
}
foreach($ul as $list){
    echo $list . "<br/>";
}

Edited by Squidge

3
Contributors
5
Replies
7
Views
5 Years
Discussion Span
Last Post by Squidge
2

@Squidge

I'm not sure what are you asking. Do you mean you want to get rid those tags and replace a new one?

0

@LastMitch

I want to get ride of them although they look to be embedded:

This is an example of the scrape:

supports Coreâ„¢ 2 Duo/Coreâ„¢ 2 Duo LV Processor F

This should read:

supports Core 2 Duo/Core 2 Duo LV Processor F

2

@Squidge

supports Coreâ„¢ 2 Duo/Coreâ„¢ 2 Duo LV Processor F

I think you need to change the document's character encoding in "meta" tag.

Try to change "charset" value to utf-8 or something else.

Edited by LastMitch: grammer

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.