ASP写的批量导出IIS域名列表
最近估计很多人都碰到和我同样的问题,就是因为扫黄及备案管理非常严,一个没备案直接关服务器,一个黄站直接封机房。现在网站所有域名必需通过备案,以前还松点。但我们服务器100多个,总不能一个一个检查吧,上网搜了下,有个程序稍合适,但导出的是网站域名站点名,我修改为导出域名列表,同时解决了导出一个站点绑定多个域名的问题,更适合自己的应用,原程序无从考究出处,本着开源原则,现把修改后的源码放出来,希望能对大家有用。
使用方法
1.在IIS中导出xml配置文件。可参考下面图片。在网站点右键,选择所有任务,选择保存至一个文件,例如存为iis.xml。
2.把下面程序复制到记事本后,保存为一个asp文件,例iis.asp,然后放在网站一个有执行脚本权限的目录即可执行。同时需要把刚才导出的xml文件放在同目录下。
<%option explicit
dim fso
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
dim ts
Set ts = fso.OpenTextFile(server.MapPath("iis.xml"),1) '修改此处的iis备份文件名即可,同目录下哦
dim content
content= ts.ReadAll
content=Replace(content,chr(13),"")
content=Replace(content,chr(10),"")
content=Replace(content,chr(32),"")
content=split(content,"IIsWebServe")
function getdomain(str)
dim reg,readstr,matches,match1
set reg=new Regexp
reg.Multiline=True
reg.Global=false
reg.IgnoreCase=true
reg.Pattern="ServerBindings(.*)ServerComment"
Set matches = reg.execute(str)
For Each match1 in matches
readstr=match1.Value
Next
Set matches = Nothingx
Set reg = Nothing
getdomain=replace(readstr,"ServerBindings=","")
getdomain=replace(getdomain,"""","")
getdomain=replace(getdomain,"ServerComment","")
end function
response.Clear()
dim i
for i=0 to ubound(content)
if instr(content(i),"ServerBindings")>0 then
response.Write Replace(getdomain(content(i)),":80:","<br>")&"<br>"
end if
next
%>
相关文档:
内容是:
function _doPostBack(){};
if(typeof("__doPostBack")=="function")
{
_doPostBack=__doPostBack;
__doPostBack=_doPostBackNew;
}
document.attachEvent("onmousemove",_onmousemove);
var _isPosting=false;
var _divMask=null; ......
软件名称:风渡科技ASP网上购物系统 v0912-26
软件大小:7069k
运行环境:ASP/Access
软件类别:电子商务
软件授权:免费
开发商家: 风渡科技
官方网站:http://www.chinammc.com
演示地址:http://demo01.chinammc.com
下载地址: http://w ......
Access 连接字符串
strConnect = “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDatabase.mdb;”
Access 2007 连接字符串
strConnect = “Provider=Microsoft.ACE.OLEDB.12.0;Mode=Share Exclusive;Data Source=C:\MyDatabase.accdb;”
MSSQL Server 连接字符串
strConnect = &ldquo ......
我写了一个表单就是用来向数据库中添加数据的 action=post.asp method=post
然后再post.asp当中我又通过request.form获取了相应的值,然后添加的数据库当中
所有的代码如下
------------------------------------conn.asp-----------------------------
<%
dim db
const databasetype="access"
db="data\meiyijix ......
在编程过程中,经常需要页面之间的传值;特别是中文传递的时候,经常出现乱码现象,很是郁闷。下面是我在网上找到的一些方法,供大家参考。
1.设置web.config文件。(没有用过)
<system.web>
......
<globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" fileEncoding="gb2 ......