我想要获取一个类似于这样的网站的源代码:
<? $txt = file_get_contents('http://stats.pingdom.com/qmwwuwoz2b71/522741');
echo $txt; ?>
我希望你能把相对链接替换为绝对链接!基本上,
<img src="/images/legend_15s.png"/> and <img src='/images/legend_15s.png'/>
应该被替换为
<img src="http://domain.com/images/legend_15s.png"/>
并且
<img src='http://domain.com/images/legend_15s.png'/>
分别。我该怎么做?