PHP uses regular expressions to obtain the image url
The specific implementation method is as follows:
The code is as follows:
header("Content-type:text/html;charset=utf-8");
$str = '
';
$pattern = "/[img|IMG].*?src=['|"](.*?(?:[.gif|.jpg]))['|"].*?[/]?> /";
preg_match_all($pattern,$str,$match);
echo "
";
print_r($match);
?>
http://www.bkjia.com/PHPjc/944935.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/944935.htmlTechArticlephp uses regular expressions to obtain the image url. The specific implementation method is as follows: The code is as follows: ?php header(Content- type:text/html;charset=utf-8); $str = 'pimg src=images/11111111.jpg a...