이 링크는 HTML 페이지 안에 있습니다.바로 preg_match를 만들 수 없습니다!
<img id="catImage" width="250" alt="" src="http://dev-server2/image2.png" />
나는 src
의 값을 얻기 위해 원하는 preg_match
이 정규식 물건을 모두와 함께 점점 있지 않다. 이게 맞습니까?
preg_match(
"/<img id=\"catImage\" width=\"[0-9]+\" alt=\"\" src=\"([[a-zA-Z0-9]\/-._]*)\"/",
$artist_page["content"], $matches);
빈 배열이 표시됩니다.
domdocument 또는 xpath를 사용할 수 없습니까? – t00ny