利用xmlhttp,获取远程网页的文状态码,通常利用此功能可以检测网页状态是否正常。
以下是源码:

.版本 2
.局部变量 xmlhttp, 对象
xmlhttp.创建 (“Microsoft.XMLHTTP”, )
xmlhttp.方法 (“Open”, “HEAD”, “http://地址”, 假)
xmlhttp.方法 (“Send”, )
输出调试文本 (xmlhttp.读数值属性 (“status”, ))

利用此功能,无论文件多大,可以马上返回状态码。
下附HTTP状态码:

状态码:描述 
100:Continue
101:Switching protocols
200:OK
201:Created
202:Accepted
203:Non-Authoritative Information
204:No Content
205:Reset Content
206:Partial Content
300:Multiple Choices
301:Moved Permanently
302:Found
303:See Other
304:Not Modified
305:Use Proxy
307:Temporary Redirect
400:Bad Request
401:Unauthorized
402:Payment Required
403:Forbidden
404:Not Found
405:Method Not Allowed
406:Not Acceptable
407:Proxy Authentication Required
408:Request Timeout
409:Conflict
410:Gone
411:Length Required
412:Precondition Failed
413:Request Entity Too Large
414:Request-URI Too Long
415:Unsupported Media Type
416:Requested Range Not Suitable
417:Expectation Failed
500:Internal Server Error
501:Not Implemented
502:Bad Gateway
503:Service Unavailable
504:Gateway Timeout
505:HTTP Version Not Supported

以上HTTP状态码摘自:http://bbs.blueidea.com/thread-2681192-1-1.html

Related Posts: 易语言-xmlhttp-读取网页状态码-附HTTP状态码 :