!!!!!!!!!!!高分提问:关于asp判断一个ip是否关机状态。

geekpi 2003-08-30 07:43:04

需要达到一个ip地址,对她的一个端口是否打开,而且还要知道他是否开机。两项都需要知道。

...全文
53 22 打赏 收藏 转发到动态 举报
写回复
用AI写文章
22 条回复
切换为时间正序
请发表友善的回复…
发表回复
geekpi 2003-08-31
  • 打赏
  • 举报
回复
那怎么建立可信任的环境呢?

首先声明,我和他人与人之间是信任的,而机子却不这么认为......:)
luluso 2003-08-31
  • 打赏
  • 举报
回复
难!你总想知道别人。。别人却总想不让你知道。就更难上加难。
geekpi 2003-08-31
  • 打赏
  • 举报
回复
这方面的资料太少了。
formatkm 2003-08-31
  • 打赏
  • 举报
回复
在asp中很难做到,在期待中
chjpeng 2003-08-31
  • 打赏
  • 举报
回复
asp判斷一個面頁是否存在
<SCRIPT LANGUAGE="javascript">
function isExist(url) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
xmlhttp.open("GET",url,false)
xmlhttp.send()
if(xmlhttp.status==200)
alert(url+" 存在")
else
alert(url+" 不存在")
}
</SCRIPT>
<input type="button" onclick="isExist('http://www.sayee.com/cloudchen/js/myCalendar.htm')" value="检测url是否存在">

返回的結果是提示信息:存在或不存在,當然也可以改成別的,試過,比較有效

不過possible_Y和孟子的方法都是可行的,測試過~
AngelGavin 2003-08-31
  • 打赏
  • 举报
回复
Microsoft VBScript 运行时错误 错误 '800a0046'

没有权限

/ping.asp,行 28

怎么解决,高手指点啊
如何判断服务器是否支持WScript
AngelGavin 2003-08-31
  • 打赏
  • 举报
回复
SC
eafin 2003-08-31
  • 打赏
  • 举报
回复
看看你的服务器是否支持WScript!
geekpi 2003-08-31
  • 打赏
  • 举报
回复
to:possible_Y(一切皆可能)

使用你的代码,出现这样的错误:


Microsoft VBScript 运行时错误 错误 '800a0046'

没有权限

/ping.asp,行 28

也就是Result = WShShell.Run("c:\PingASP.bat " & IP, 7, TRUE)
这句不行。

我已经将iis设置成了,可以脚本资源访问、读取、目录浏览、索引资源,执行权限也改成了脚本和可执行文件。

还要怎么设置?
geekpi 2003-08-30
  • 打赏
  • 举报
回复
to : daeren(hi,美女)
ping肯定不行!有防火墙就没办法解决。

to: chjpeng(風起鵬翔)
如果是判断一个页面,如何实现?也就是请求一个页面,将返回什么?


比如判断 ftp://xxx.xxx.xxx.xxx是否开机。http://xxx.xxx.xxx.xxx:xx端口是否打开。
孟子E章 2003-08-30
  • 打赏
  • 举报
回复
没有用
孟子E章 2003-08-30
  • 打赏
  • 举报
回复
http://www.pconline.com.cn/pcedu/empolder/wz/asp/10202/33999.html
daeren 2003-08-30
  • 打赏
  • 举报
回复
如果用了放火墙,ping了也有用吗?
sailor001 2003-08-30
  • 打赏
  • 举报
回复
使用wsh就可以了
chjpeng 2003-08-30
  • 打赏
  • 举报
回复
樓上的代碼可行!

調用本機文件連個提示都沒?有點暈..
chjpeng 2003-08-30
  • 打赏
  • 举报
回复
如果是ip上有一個頁面還可以采取判斷頁面的方式,
如判斷http://xxx.xxx.xxx.xxx/index.asp是否存在
possible_Y 2003-08-30
  • 打赏
  • 举报
回复
<HTML>
<HEAD>
<TITLE>PING IP CONSOLE</TITLE>
<style>
.term {
font-size: 16;
font-family: arial;
color: white;
background-color: black;
font-weight: bold
}
</style>
</HEAD>
<BODY class=term>
<FORM METHOD=GET ACTION=ping.asp>
C:\>ping <INPUT class=term style="border: 0" TYPE=TEXT NAME=IPadd VALUE="<% = Server.HTMLEncode(Request("IPadd")) %>">
</FORM>
<%
IP = Request.QueryString("IPadd")
IF IP="" Then
Response.end
else
PingIP()
End if

Function PingIP()
Set WShShell = Server.CreateObject("WScript.Shell")
Result = WShShell.Run("e:\work\PingASP.bat " & IP, 7, TRUE)

if Result = 0 Then
Set FileSys = Server.CreateObject("Scripting.FileSystemObject")
Set TextFile = FileSys.OpenTextFile("e:\Tmp.txt", 1)
TextBuffer = TextFile.ReadAll
Response.write "<PRE STYLE='font-family: Lucida Console;font-size: 14;font-weight: bold'>" & TextBuffer & "</PRE>"
TextFile.Close
FileSys.DeleteFile "e:\Tmp.txt"
else
Response.write "Error"
end if
End Function
%>
</BODY>
</HTML>

PingASP.bat :
ping -a %1 > e:\tmp.txt
chjpeng 2003-08-30
  • 打赏
  • 举报
回复
asp咋ping?
possible_Y 2003-08-30
  • 打赏
  • 举报
回复
ping啊
chjpeng 2003-08-30
  • 打赏
  • 举报
回复
判斷頁面是否存在倒行...
加载更多回复(2)

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧