i am new in Php and i wanted to learn codes for taking infos from another site. i looked preg_match and explode.
My question is i wanted to take some infos but there are not tags.
I used this code for this tag
$site=file_get_contents("$link");
$price='#<div class="price">(.*?)<\/div>#si';
preg_match_all($price,$site,$pricelist);
for ($a=0; $a<5; $a++){
echo $pricelist[1][$a];
}
But in the source code it is like this :
<b>500€</b></a><div class=gh_hl1>
<b>510€</b></small></a><br clear=all><div class=gh_hl1>
<b>520€</b></a><div class=gh_hl1>
<b>530€</b></a><div class=gh_hl1>
<b>540€</b></a><div class=gh_hl1>
<b>550€</b></a><div class=gh_hl1>
It starts with <b>
this tag and it finishes with <div class=gh_hl1>
and </small></a><br clear=all><div class=gh_hl1>
and also there are another tags starts with <b>
I wonder that is there any possibility to take this prices?
And also i looked Simple HTML Dom Parser. But i couldn't find anything. Thanks for your answers...