zoukankan      html  css  js  c++  java
  • php.net新闻拦截

    简介:这是php.net新闻拦截的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。

    class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=323420' scrolling='no'> <?
    //请自己修改下面变量.
    $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>";
    ?>

    “php.net新闻拦截”的更多相关文章 》

    爱J2EE关注Java迈克尔杰克逊视频站JSON在线工具

    http://biancheng.dnbcw.info/php/323420.html pageNo:16
  • 相关阅读:
    Linux下如何查看哪些进程占用的CPU内存资源最多
    linux查看端口占用情况
    oracle11g用户名密码不区分大小写
    oracle表导入导出
    Oracle的实例占用内存调整
    修改oracle内存
    ORA-04031: 无法分配 共享内存
    OCI_INVALID_HANDLE 什么原因
    Android SDK Manager国内无法更新的解决方案
    sqlite3增删改查简单封装
  • 原文地址:https://www.cnblogs.com/ooooo/p/2255903.html
Copyright © 2011-2022 走看看