动网论坛,站长建站首选,国内使用量最多的论坛软件 动网论坛官方技术讨论区 站长工具 申请属于您自己的免费论坛
首页 | 新闻资讯 | 网站运营 | 网络编程 | 数据库 | 服务器 | 网页设计 | 图像媒体 | 网络应用 | 搜索优化 | 资源下载 | 动网主机
    本站内  互联网 ASP论坛  ASP.Net论坛  PHP论坛
  
   Cgi/Perl → 阅读文章

 使用脚本下载网页

作者来源: 
阅读 1785 人次 , 2006-3-29 4:02:00 

/**
* script: dlwebpage.js
* purpose: downloads the webpage specified by 'url'
* author: daren thiel
* date: 17 may 1999
*
* note: rename this script dlwebpage.js
* web: http://www.winscripter.com
* copyright 1999 daren thiel
**/

// the url to download
var url = "http://www.aboutnt.com/default.htm"

// create instance of inet control
inet = new activexobject("inetctls.inet");

// set the timeout property
inet.requesttimeout = 20;

// set the url property of the control
inet.url = url;

// actually download the file
var s = inet.openurl();

// show the raw html to the user
wscript.echo( s );

// bonus - find the title of the page
// regular expression to find the string stored between
// the title tags.
rtitle = /<title>(.*)<\/title>/i;

// execute the regular expression on the raw html
var title = rtitle.exec( s );

// display the result
wscript.echo( regexp.$1

 
 收藏本文  打印本文  论坛讨论  关闭窗口
· 上一篇:对ikonboard v2.1.9物理路径泄露的分析
· 下一篇:申请14个CGI程序服务
· 跟我学Perl(5)
· Cgi入门教程之:5 Perl简介
· Perl语言的文字处理模式之三(1)
· 用Perl语言进行Socket编程
· CGI教程(7)解码数据发送给CGI脚本之二


关于本站 | 联系我们 | 业务合作 | 客户案例 | 诚聘英才 | 广告合作 | 收藏本站
海口动网先锋网络科技有限公司版权所有
Copyright © 2000 - 2006 Cndw.Com
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077