Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top