让客户端自动向服务器发送数据
我正在运行一个服务器端应用程序,它接收从客户端到某些 IP 地址的 ping 数据。 目前,有人前往这些客户端并手动执行 ping。 我可以通过 javascript 或任何客户端语言自动执行客户端运行 ping 程序的过程吗?
我想让客户端自动 ping 几个 IP 地址,然后从 ping 请求中提取数据,然后将这些数据提供给服务器以便记录下来。 这可能吗?
i am running a server side application which receives data of ping done from client side to certain ip addresses.
Currently a person goes to these clients and does the ping manually.
Can i automate this process of client running the ping program through javascript or any client side language ?
I want to make the client automatically ping a few ip addresses, then extract the data from the ping request and then feed this data to the server so it can be recorded.
Is this possible ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你无法从 Javascript 中获取如此低级的信息。
你可以做的是http://speedtest.net风格的速度测试,它使用JS来回发送数据或弗拉斯。然而,我预计适当的速度测试实施起来并不容易。我认为如果可以的话,有些提供商会转售他们现成的速度测试解决方案。
除此之外,根据您的情况,也许可以考虑编写一个可执行程序来调用系统的
ping
命令并将结果传输给您。当然,这需要客户端安装。I don't think you can get hold of such low-level information from within Javascript.
What you could do is speed tests in the style of http://speedtest.net, which send data back and forth using JS or Flas. However, I expect a proper speed test is not trivial to implement. I think there are providers who re-sell their ready-made speed testing solutions if that's an option.
Other than that, depending on your situation, maybe consider writing an executable program that calls the system's
ping
command and transmits the results to you. That would require client-side installation though, of course.