个人站长制做网页常用的php代码
<?php
$str = file("http://tq.tom.com/china/index.html");
$count = count($str);
for ($i=0;$i<$count;$i++){
$file .= $str[$i];
}
$tomtq = explode("<table width=\"774\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\" bgcolor=\"#ABABAB\">",$file);
$tomtq = explode("</table>",$tomtq[1]);
$tomtq= $tomtq[0];
//$tomtq tom天气小偷
?>
天气预报 code来的
天气预报
var locid;
var cityname;
var defid;
if(getCookie("defid")=='')
{
locid=CityID;
setCookie("defid",CityID);
}else
{
locid=getCookie("defid");
}
var havecheck;
if(getCookie("check")==''){
havecheck='2';
}else{
havecheck=getCookie("check");
}
var show;
if(havecheck=='0'){
locid=getCookie("CityID");
show=0;
}else {
locid=getCookie("defid");
show=1;
}
var urlstr = "http://jsp.116.com.cn/weather/"+locid+".js";
document.all["objscript"].src = urlstr;
//var oWea = new makeWeatherObj();
var oWea = new makeWeatherObj();
|
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]