网站常用代码

asp怎么样转换成html 代码

发表日期:2012-3-12 文章来源:本站 浏览:
<%
ID=CheckID(Request.QueryString("ID"))
session("help")=int((10-1+1)*Rnd + 1)
server.ScriptTimeout=9999
function getHTTPPage(url) 
dim Http 
set Http=server.createobject("MSXML2.XMLHTTP") 
Http.open "GET",url,false 
Http.send() 
if Http.readystate<>4 then 
exit function 
end if 
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312") 
set http=nothing 
if err.number<>0 then err.Clear 
end function 
''''''''''''''''''''''''''''''''''
Function BytesToBstr(body,Cset) 
dim objstream 
set objstream = Server.CreateObject("adodb.stream") 
objstream.Type = 1 
objstream.Mode =3 
objstream.Open 
objstream.Write body 
objstream.Position = 0 
objstream.Type = 2 
objstream.Charset = Cset 
BytesToBstr = objstream.ReadText 
objstream.Close 
set objstream = nothing 
End Function 


'''''''''''''''''''此处是要生成的静态页的地址''''''''''''''''''''''''''''''''''''''''''


txtURL="http://www.51wisdom.com.cn/news_con.asp?id="&id 


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


sText = getHTTPPage(txtURL) 
Set FileObject=Server.CreateObject("Scripting.FileSystemObject") 
filename=server.MapPath("/")&"/html/"&id&".html"


Set openFile=FileObject.OpenTextfile(filename,2,true) 'true为不存在自行建立 
openFile.writeline(sText)
Set OpenFile=nothing 




function checksql(kustr)


checksql=server.htmlencode(replace(replace(replace(kustr,"<>"," "),"* from "," "),"="," "))


end function
response.Write("<script language=javascript>alert('信息发布成功!');window.location.href='list.asp';</script>")
%>
公司座机:0797-8296060 免费服务热线:0797-8296060 400-1010-719
业务QQ:192087878 511889889 公司地址:赣州市章贡区安虔路22号A栋(203)
朝扬网络提供

高端网站建设

赣州网站建设公司

赣州网站建设

  
我们只做有价值的网站!
更多
2006-2020 © 赣州网站建设|赣州做网站|赣州网站建设价格|赣州网页制作|赣州建网站公司|电话:0797-8296060|赣州朝扬网络科技有限公司
赣ICP备15004771号
赣公安网备案编号:36070202000754
工商编号:360702210040706

赣公网安备 36070202000754号