php在加载的html中查找包含“.go.co.in”的子域名并更改为目录
假设
@$dom->loadHTML($html);
在$ html中找到所有网址包含“.go.co.in”并更改为
<a href="http://name1.go.co.in to <a href="http://go.co.in/name1
<a href="http://sub.name2.go.co.in to <a href="http://go.co.in/sub.name2
<a href="http://anything.go.co.in to <a href="http://go.co.in/anything
我尝试了很多方法,但没有成功,请帮帮我
答案 0 :(得分:0)