其他网站时间借用过来,变成自己的程序。
<?
$url = "http://bjtime.cn/worldtime.asp"; //目标站
$fp = @fopen($url, "r") or die("超时");
$fcontents = file_get_contents($url);
//eregi("<title>(.*)</title>", $fcontents, $regs); eregi前俩个参数比较为真 返回数组$regs
$fcontents=str_replace( "src=/"world.gif/"","src=/"http://bjtime.cn/world.gif/"",$fcontents);
$fcontents=str_replace("src=/"http://pagead2.googlesyndication.com/pagead/show_ads.js/"","src=/"http://wujiang/"",$fcontents);
$fcontents=str_replace( "久久时间网","<font color=/"#FF00FF/" ><b><a href=/"http://bjtime.cn/">江江时间网</a><b></font>",$fcontents);
echo $fcontents;
/*foreach($regs as $key=>$val){
echo $key."=".$val;
}
*/?>