asp判斷能否訪問外網(wǎng)的一段簡單代碼
當(dāng)前位置:點(diǎn)晴教程→知識管理交流
→『 技術(shù)文檔交流 』
[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 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |