I'm trying to connect to a device via telnet using PHP code below,
$fp = fsockopen("xx.xx.xx.xx", 11011, $errno, $errstr, 120);
but I'm getting error "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060)"
I can connect OK to that same device using Windows Command Prompt with simple "telnet xx.xx.xx.xx 11011". Device doesn't require user/pass.
I have already tried increasing the timeout period.
- What could be wrong here?
- Is it possible the device has some kind of firewall preventing connection from PHP/fsockopen?
- How is connecting thru Command Prompt different from connecting thru PHP in terms of protocol used?
- Will appreciate any ideas/reference on how to connect and issue telnet command using PHP.
Thanks.