ציטוט:
נכתב במקור על ידי elbaz.maor
PHP קוד:
<?php
$file = '<IMG SRC="/chartfx62/temp/XXXXX.png" WIDTH="350" HEIGHT="196" Jpeg';
preg_match_all('/<IMG SRC="\/chartfx62\/temp\/(.*?).png".*/', $file, $f);
print_r($f);
?>
|
עשיתי ככה:
PHP קוד:
$url = "http://www.tase.co.il/TASE/MarketData/Indices/MarketCap/IndexMainDataMarket.htm?Action=1&IndexID=142";
$site = file_get_contents($url);
preg_match_all('/<IMG SRC="\/chartfx62\/temp\/(.*?).png".*/', $site, $f);
print_r($f);
והוא הביא לי את השגיאה:
Warning: preg_match_all() expects parameter 2 to be string, array given in ..