我尝试在一个div返回一个数字,我想有 “01 55 33 44”文件获取内容+预浸比赛
<div data-phone="01 55 33 44" class="agency_phone ">
Phone
</div>
我有尝试:
$url = "myurl";
$raw = file_get_contents($url);
preg_match('/<div data-phone="(.*)"class="agency_phone "/isU',$raw,$output);
echo $output[1];
我有没有回报, somone有一个想法?
在此先感谢。
请详细说明你的代码和问题,为更好地理解。 –
我尽我所能,只是我想检索电话号码。 – Jeed
'data-phone =“([^”] +)“class' – splash58