欢迎光临
我们一直在努力

php.net新闻拦截-PHP教程,PHP应用

建站超值云服务器,限时71元/月

<?

//请自己修改下面变量.

$newsnum=7;

$space=20;

$width=400;

$headclass="class5";

$lowerclass="class6";

//变量设置结束.

print "<html><head><link rel=stylesheet href=dark.css></head><body>";

$opened=$query_string;

if ($opened=="") { $opened="-1"; }

print "<table><tr><td class=class5><a target=_blank href=http://www.php.net>www.php.net</a></td></tr>";

$file=file(http://www.php.net);

$where="";

$a=0;

while ($a<count($file)) {

$file[$a]=chop ($file[$a]);

if ($file[$a]=="<!–http://www.php.net/–>") {

$where=$a;

break 1;

}

$a++;

}

$file=file(http://www.php.net);

$a=$where+1;

$b=0;

while ($b<$newsnum) {

if (substr($file[$a],0,4)=="<h3>" & substr($file[$a],-6,5)=="</h3>" | substr($file[$a],0,4)=="<h3>" & substr($file[$a],-7,5)=="</h3>") {

$from=$to;

$to=$a;

}

if ($to==$a & $from!="") {

$c=$from;

if ($b==$opened) {

while ($c<$to) {

if (substr($file[$c],0,9)=="<img src=") {

$file[$c]="";

}

$file[$c]=eregi_replace("src="","src="http://www.php.net/",$file[$c]);

$file[$c]=eregi_replace("href="","href="http://www.php.net/",$file[$c]);

$file[$c]=eregi_replace("<h3>","</td></tr><tr><td width=$width class=$headclass><a href=$php_self?-1>",$file[$c]);

$file[$c]=eregi_replace("</h3>","</a></td></tr><tr><td width=$width class=$lowerclass>",$file[$c]);

print $file[$c];

$c++;

}

} else {

if (substr($file[$c],0,9)=="<img src=") {

$file[$c]="";

}

$file[$c]=eregi_replace("src="","src="http://www.php.net/",$file[$c]);

$file[$c]=eregi_replace("href="","href="http://www.php.net/",$file[$c]);

$file[$c]=eregi_replace("<h3>","</td></tr><tr><td width=$width class=$headclass><a href="$php_self?$b">",$file[$c]);

$file[$c]=eregi_replace("</h3>","</a></td></tr><tr><td width=$width class=$lowerclass>",$file[$c]);

print $file[$c];

}

$b++;

}

$a++;

}

print "</table>";

print "</body></head>";

?>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » php.net新闻拦截-PHP教程,PHP应用
分享到: 更多 (0)

相关推荐

  • 暂无文章