网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > PHP实例
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
本月文章推荐
.一个个人网页自动化生成系统(1).
.php的计数器程序.
.仅用PHP4 Session实现的迷你购物.
.繁体中文转换为简体中文的PHP函数.
.基于mysql的论坛(7).
.PHP输出控制功能在简繁体转换中的.
.聊天室php&mysql(二).
.PHP+TEXT留言本(二).
.在PHP3中实现SESSION的功能(一).
.采用行写方式的聊天程序(之四).
.基于数据库的在线人数,日访问量.
.PHP+MYSQL留言本.
.提升PHP执行速度全攻略(下) .
.杏林同学录(九).
.基于mysql的论坛(5).
.用php+mysql一个名片库程序.
.一个颜色轮换的简单例子.
.PHP的面向对象编程:开发大型PHP.
.搜索和替换文件或目录的一个好类.
.PHP的面向对象编程:开发大型PHP.

php.net新闻拦截!

发表日期:2000-12-10


<?
//请自己修改下面变量.
$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>";
?>  

【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】    
上一篇:采用行写方式的聊天程序(之三) 人气:11219
下一篇:一个简单的PHP投票程序 人气:12888
浏览全部的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐