asp判断能否访问外网的一段简单代码
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
[p]set x = server.createobject("msxml2.xmlhttp")[br]x.open "get","[url=http://www.baidu.com/img/baidu_logo.gif",false]http://www.baidu.com/img/baidu_logo.gif",false[/url][br]x.send[br]if isnull(x.responsetext) then[br]response.write "no picture!"[br]else[br]if (not isempty(x.responsetext)) and lcase(left(x.responsetext,3))="gif" then[br]response.write "yes,picture!"[br]else[br]response.write "no picture!"[br]end if[br]end if[/p]
该文章在 2010/3/31 10:18:48 编辑过 |
关键字查询
相关文章
正在查询... |