web tools rank checker

domain .cn
.net .cn .com.cn
你正在阅览 :: 简体中文:: 学习 ASP SQL VB HTML code

学习 .ASP SQL HTML XML CSS JAVA Perl code study
English Chinese_Traditional Chinese_Simplified

你正在阅览 :: 简体中文 Chinese_Simplified

学习.主题:
首页
ASP
. Active-Server-Flash
. Array
. Connection
. Count
. Counter
. Distinct
. Email
. File
. Folder
. Function
. GetSQLserver
. Header
. mySQL
. Record
. Recordset
. Request
. Response
. Server
. Server-CreateObject
»AspHTTP-Conn
»Microsoft-XMLDOM
»Microsoft-XMLHTTP
»Microsoft-XMLHTTP-header
»MSXML2-ServerXMLHTTP
. ServerVariables
. Session
. Special-Symbols
. String
. Sub
. Time
CSS
Ecommerce
HTML
InternetProtocol
JAVA
Microsoft
Robots
SearchEngine
SQL
SQLserver
VBscript
XML

SiteMap

3w....学习.教学 > ASP > server-createobject » msxml2-serverxmlhttp

3w learning

server-createobject >
msxml2-serverxmlhttp

Title:

Set oXMLHttp = Server.CreateObject("MSXML2.ServerXMLHTTP") Set oXMLHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")


档案下载语法MSXML2.ServerXMLHTTP
Description:

Server.CreateObject("MSXML2.ServerXMLHTTP") this can check server header to check if the server is ready to run HTTP or not ------ attention ------- a bad HTTP header will not ne indexed by search engine bots same as CGI perl.pl script must write HTTP headers


Example Code:

<% dim oxMLhttp : Set oXMLHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") '----------------------or-------------------- dim oXMLHttp dim url url="http://www.ezer.com" Set oXMLHttp = Server.CreateObject("MSXML2.ServerXMLHTTP") oXMLHttp.Open "GET", url, true oXMLHttp.send() ' Send the request. 'Turn off error handling On Error Resume Next 'Wait for up to 5 seconds if get no data If oXMLHttp.readyState <> 4 then oXMLHttp.waitForResponse 5 End If strData = oXMLHttp.Status 'when error occur if err.number<>0 then err.Clear Set oXMLHttp = Nothing if strData<>200 then response.write "the server "&url&" headers may not available yet" else response.write "the server "&url&" is ready to run HTTP" end if %> ----- HTTP headers check status <> 200 ok or not ok ---- <% If (oXMLHttp.readyState <> 4) Or (oXMLHttp.Status <> 200) Then 'Abort the XMLHttp request oXMLHttp.Abort strData = "Problem receiving remote server data..." Else strData = oXMLHttp.ResponseText End If %> '---------------------------------------- Example code 2: < %@Language="VBScript"% > < % dim oxMLhttp : set oxMLhttp = Server.CreateObject("Msxml2.XMLHTTP.3.0") oxMLhttp.open "GET", "http://----.com.xml", false oxMLhttp.send() Response.Write(oxMLhttp.responseXML.xml) % >


------- 技巧 ------
Server.CreateObject("Msxml2.XMLHTTP.3.0") 
对于建立起中文网的对象较方便
BinaryGetURL  

CreateObject("WinHttp.WinHttpRequest.5.1")
则不适合使用中文网对象的建立
.......
但是
Msxml2.XMLHTTP.3.0可能较不适用截取php的伺服数据
Example Result:

the server http://www.ezer.com is ready to run HTTP



..
...
...

[ 7/27/2008 ]

www learning school add more scripts and tips memo
You are at >>3WS.EZER.COM >> 3WS.EZER.COM/ASP/SERVER-CREATEOBJECT/MSXML2-SERVERXMLHTTP.ASP>>ASP
Helpful link:: SEO web tools :: Live PR | SERP checker
back to top Ezer code adding :: Questions ;email