好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

php.net新闻拦截!-PHP实例

<? //请自己修改下面变量. $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://HdhCmsTestphp.net>HdhCmsTestphp.net</a></td></tr>"; $file=file('http://HdhCmsTestphp.net'); $where=""; $a=0; while ($a<count($file)) {     $file[$a]=chop ($file[$a]);     if ($file[$a]=="<!--http://HdhCmsTestphp.net/-->") {         $where=$a;         break 1;     }     $a++; } $file=file('http://HdhCmsTestphp.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://HdhCmsTestphp.net/",$file[$c]);                 $file[$c]=eregi_replace("href="","href="http://HdhCmsTestphp.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://HdhCmsTestphp.net/",$file[$c]);             $file[$c]=eregi_replace("href="","href="http://HdhCmsTestphp.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>"; ?>   【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】    

查看更多关于php.net新闻拦截!-PHP实例的详细内容...

  阅读:41次