asp С͵ ²É¼¯ Àà º¯Êý ³£Óà ±ØÐë ½ØÈ¡ ±àÂëת»»
<%
'==================================================
'º¯ÊýÃû£ºGetHttpPage
'×÷ Ó㺻ñÈ¡ÍøÒ³Ô´Âë
'²Î Êý£ºHttpUrl ------ÍøÒ³µØÖ·
'==================================================
Function GetHttpPage(HttpUrl)
If IsNull(HttpUrl)=True or Len(HttpUrl)<18 or HttpUrl="$False$" Then
GetHttpPage="$False$"
Exit Function
End If
Dim Http
Set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",HttpUrl,False
Http.Send()
If Http.Readystate<>4 then
Set Http=Nothing
GetHttpPage="$False$"
Exit function
End if
GetHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
Set Http=Nothing
If Err.number<>0 then
Err.Clear
End If
End Function
'==================================================
'º¯ÊýÃû£ºBytesToBstr
'×÷ Ó㺽«»ñÈ¡µÄÔ´Âëת»»ÎªÖÐÎÄ
'²Î Êý£ºBody ------Ҫת»»µÄ±äÁ¿
'²Î Êý£ºCset ------Ҫת»»µÄÀàÐÍ
'==================================================
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
'==================================================
'º¯ÊýÃû£ºPostHttpPage
'×÷ Ó㺵Ǽ
'==================================================
Function PostHttpPage(RefererUrl,PostUrl,PostData)
Dim xmlHttp
Dim RetStr
Set xmlHttp = CreateObject("Msxml2.XMLHTTP")
xmlHttp.Open "POST", PostUrl, False
XmlHTTP.setRequestHeader "Content-Length",Len(PostData)
xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlHttp.setRequestHeader "Referer", RefererUrl
xmlHttp.Send PostData
If Err.Number <> 0 Then
Set xmlHttp=Nothing
PostHttpPage = "$False$"
Exit Function
End If
PostHttpPage=bytesToBSTR(xmlHttp.responseBody,"GB2312")
Set xmlHttp = nothing
End Function
'=================================================
Ïà¹ØÎĵµ£º
<% '---µ÷ÓÃWebService »ñÈ¡Exchange2007ÒÑÖªÓû§µÄÓʼþδ¶ÁÊý
'---²ÎÊý˵Ã÷----
'url:webservice µÄ·¾¶
'params:·½·¨²ÎÊý
'method:·½·¨Ãû³Æ
'dataType:·µ»ØµÄÊý¾ÝÀàÐÍ
function webServices(url,params,method,dataType)
set objXML=Server.CreateObject("MSXML2.XMLHTTP")
objXML.open "post& ......
Ó¦ÓóÌÐòÓòÊÇͨ¹ýCLRÇ¿ÖÆ½ç¶¨µÄÈ·±£Ó¦ÓóÌÐò¼ä²»Ï໥ӰÏìµÄµØÖ·¿Õ¼ä£¬Ëü¾ßÓÐÒÔÏÂÌØÕ÷
1£®Ò»¸ö¶ÀÁ¢µÄWebÓ¦ÓóÌÐòµÄËùÓÐWebÒ³¹²ÏíÏàͬµÄÄÚ´æ×ÊÔ´£¬ÀýÈçÈ«¾ÖµÄÓ¦ÓóÌÐòÊý¾Ý£¬Ã¿¸öÓû§µÄSessionÊý¾ÝÒÔ¼°»º´æÊý¾Ý¡£ÕâЩÐÅÏ¢²»Äܱ»ÆäËûµÄASP.Net»òASPÓ¦ÓóÌÐòÖ±½Ó·ÃÎÊ¡£
2£®Ò»¸ö¶ÀÁ¢µÄWebÓ¦ÓóÌÐòËùÓÐWebÒ³¹² ......
¸øÄãÒ»¸ö΢ÈíµÄ¼ÓÃܺö«¶«£º
Script Encoder ÏÂÔØµØÖ·£º
http://msdn.microsoft.com/scripting/vbscript/download/x86/sce10en.exe
Windows Script Engine 5.0
Windows ......
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Option Explicit
Response.Buffer = True '»º´æÍ¼Æ¬
Dim objXMLHTTP, XML
Set XML = Server.CreateObject("Microsoft.XMLHTTP") '½¨Á¢ÏÂÔØ¶ÔÏó
XML.Open "GET","http://www.google.cn/images/nav_logo7.png",False '¿ªÊ¼»ñȡͼƬ,http://xxx/pngÕâ½Ú¿ÉÒԸijÉ× ......