使用命令提示符查找特定端口[关闭]

Is it possible to find specific port using command prompt? I want to use the exec command in php to check if a port is open. The fsockopen function in php is very slow so i wanna try to use the cmd to check the port and see if that works better. I want to find if port 7878 is open.

I do not wish to download any softwares, I only want to know if it's possible to do it directly in cmd. And if its possible i want to know how the command for it

i do not know about php code but in network we using : cmd->telnet [domainname or ip] [port]

i strogly recomended not to use exec in php and evenlook here

so i found this hope help you

here (may be slower but safer)

You can use netstat:

netstat -na | find ":< port number >"

To find a foreign port you could use:

netstat -an | findstr ":N[^:]*$"

To find a local port you might use:

netstat -an | findstr ":N.*:[^:]*$"