Using Regex span id and get contents help
I nee开发者_高级运维d Regex this <span id="more-186483">
Number 186483 is constantly changing, for each item is different.
$html = file_get_contents("http://site.com/file.html");
preg_match_all('%<span id="more-.*?">(.*?)</span>%i', $html, $result, PREG_PATTERN_ORDER);
for ($i = 0; $i < count($result[0]); $i++) {
echo $result[1][$i];
}
精彩评论