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 編輯過 |
關鍵字查詢
相關文章
正在查詢... |