this is my code:
<?php
$url = 'http://www.zap.co.il/model.aspx?modelid=35860' ;
$str = file_get_contents($url);
preg_match_all('/([₪])* (\d+(:?.\d+)?)/', $str, $matches, PREG_SET_ORDER);
$i=0;
foreach ($matches as $val) {
if($i==0) $first=$val[2] ;
if($i==3) $second=$val[2] ;
$i++;
}
$bad_symbols = array(",", "."); $first = str_replace($bad_symbols, "", $first);
$bad_symbols = array(",", "."); $second = str_replace($bad_symbols, "", $second);
echo $first . "</br>";
echo $second;
?>
it worked for half a year but the site changed a little
can you adjust the preg_match to give me
the first and second numbers that are beside the symbol '₪'
but also the first number should be before the word מוזיכל (hebrew)
and the second after it
or after the umber 2635
for example
177₪
text text text
7₪
text text text
2635
text
99₪
text text text
מוזיכל
text text text
110₪
i need it to print 99 for $first
and 110 for $second
thanks