php.com新闻拦截_PHP
时间:2021-07-01 10:21:17
帮助过:4人阅读
//请自己修改下面变量.
$newsnum=7;
$space=20;
$width=400;
$headclass="class5";
$lowerclass="class6";
//变量设置结束.
print "";
$opened=$QUERY_STRING;
if ($opened=="") { $opened="-1"; }
print "
www.php.com |
";
$file=file('http://www.php.com');
$where="";
$a=0;
while ($a $file[$a]=chop ($file[$a]);
if ($file[$a]==""https://www.gxlcms.com/) {
$where=$a;
break 1;
}
$a++;
}
$file=file('http://www.php.com');
$a=$where+1;
$b=0;
while ($b<$newsnumhttps://www.gxlcms.com/) {
if (substr($file[$a],0,4)=="" & substr($file[$a],-6,5)=="
" | substr($file[$a],0,4)=="" & substr($file[$a],-7,5)=="
"https://www.gxlcms.com/) {
$from=$to;
$to=$a;
}
if ($to==$a & $from!=""https://www.gxlcms.com/) {
$c=$from;
if ($b==$openedhttps://www.gxlcms.com/) {
while ($c<$tohttps://www.gxlcms.com/) {
if (substr($file[$c],0,9)==" }
$file[$c]=eregi_replace("src="","src="http://www.php.com/",$file[$c]);
$file[$c]=eregi_replace("href="","href="http://www.php.com/",$file[$c]);
$file[$c]=eregi_replace("","",$file[$c]); $file[$c]=eregi_replace(""," |
",$file[$c]); print $file[$c]; $c++; } } else { if (substr($file[$c],0,9)==" } $file[$c]=eregi_replace("src="","src="http://www.php.com/",$file[$c]); $file[$c]=eregi_replace("href="","href="http://www.php.com/",$file[$c]); $file[$c]=eregi_replace(""," |
",$file[$c]); $file[$c]=eregi_replace(""," |
",$file[$c]); print $file[$c]; } $b++; } $a++; } print " |
";
print "";
?>