// $text=file_get_contents(‘http://huaban.com/‘);
// preg_match_all(‘/<img[^>]*>/i‘, $text, $match);
// print_r($text);
$keyword = "火影";
$keyword = urlencode($keyword);
$url = "www.baidu.com";
$html = file_get_contents($url);
preg_match_all("/\"[^\"]*[^0]\.jpg\"/", $html, $text);
foreach ($text as $key => $value) {
foreach ($value as $img) {
$a=‘www.baidi.com‘;
$img=substr($img, 1,strlen($img)-2);
// $img=$a.$img;
// var_dump($img);
print "<img src=".$a.$img . " /><br/>";
}
}
时间: 2024-11-07 13:34:53