奇趣技术网 收藏本站
设为主页
商务合作
首页 新闻中心 行业动态 软件新闻 安全资讯 病毒预警 漏洞发布 操作系统 Dos Win9x Win2000 WinXP Win2003 WinVista Linux Unix
数据库 DB2 Access MSSQL MySQL Oracle Sybase 编程技术 ASP PHP JSP CGI/Perl XML .Net C/C++/C# VB VC Delphi Java 汇编
安全技术 安全教学 工具介绍 漏洞利用 病毒防范 入侵检测 防火墙 安全防范 汉化破解 攻击实例 加密解密 技术论坛
中华网络安全联盟 >> 程序开发 >> Perl >> 一个程序自动刷新页面的例子
程序开发
Asp
PHP
JSP
CGI/Perl
XML
.Net
C/C++/C#
Visual Basic
Visual C++
Delphi
Java
汇编语言
  • LB5000XP论坛配合SERV

  • 获取随机的由大小写字

  • Perl操作Mysql数据库

  • Perl在NT下的快速简便

  • 用Perl制作页面计数器

  • 用Perl语句来代替常用

  • 用 perl 实现文件上传

  • perl 域名查询程序

  • 一个程序自动刷新页面的例子
    字体:

    中华网络安全联盟    作者:佚名    来源:网络转载    时间:2006-3-21


    #!/usr/bin/perl

    use HTTP::Request;
    use LWP::UserAgent;
    my $ua = new LWP::UserAgent;
    $|=1;
    print "content-type:text/html\n\n";
    $ua->agent("AgentName/1.0 " . $ua->agent);
    $ua->timeout(80);
    # Create a request
    my $req = new HTTP::Request POST => 'http://search.sina.com.cn/cgi-bin/search/search.cgi';
    $req->content_type('application/x-www-form-urlencoded');
    my $buffer="ss=sina&_searchkey=%BB%EE%B6%AF%2B%BD%B1%CF%EE&_andor=and&s1=%CB%D1%CB%F7";
    $req->content($buffer);
    # Pass request to the user agent and get a response back
    my $res = $ua->request($req);
    # Check the outcome of the response
    if ($res->is_success) {
    print length($res->content);
    print <<END;
    <META HTTP-EQUIV="Refresh" Content=1;Host="http://***.***.***.***/nperl/autorefresh.pl">

    END
    ;
    print $res->content ;

    } else {

    print "bad luck";
    }

    字体:
     
    设为主页 收藏本站 联系我们 友情连接 商务合作 网友留言
    Copyright©2006-2008 中华网络安全联盟 All rights reserved.