dongmei8511 2014-03-07 14:57
浏览 125
已采纳

Traceroute通过php(或其他东西)到不同的IP

I need to figure out a way that users in my internal network can trigger a traceroute from their PC to a particular server that is not the webhost server. My thought is to somehow open a telnet session on their PC using admin rights, run the traceroute, and somehow retrieve that data and put it back on the webpage. I would like to do this with as little user interaction as possible.

Is there even a remote possibility that this can be done? I am able to open a telnet session with fsock, but that is as far as I have gotten.

  • 写回答

1条回答 默认 最新

  • duanjiong1952 2014-03-07 15:00
    关注

    No you can't. PHP runs on the server, not on the client. So the traceroute will be started from the server which is running the PHP script. It will never trigger a traceroute from the PC of the user requesting the website.

    I am able to open a telnet session with fsock, but that is as far as I have gotten.

    You can do that with PHP, but this connection is from your server on which the PHP script is running. It will never be from the client requesting the website. So in the form you stated your question now, the answer is: NO that is not possible.

    However please see this SO question Here a java applet is suggested. A Java applet runs in the client browser and IS capable of doing a traceroute from the clientside. So that will be the way to go for you. But this has nothing to do with PHP at all.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求帮我调试一下freefem代码
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图