How do I use fsockopen() to open a Telnet connection with a password?

前端 未结 3 633
面向向阳花
面向向阳花 2021-01-15 04:09

I\'d like to access a camera through it\'s Telnet capability. The problem is, it has Password-protection. This is no problem when doing it via Terminal, as I just use

3条回答
  •  借酒劲吻你
    2021-01-15 04:26

    You just output it. Some examples I've seen use fputs. You might have to sleep for a second to make sure the prompt comes up. There's actually an example in the comments on the fsockopen manual page: http://php.net/manual/en/function.fsockopen.php

    Really though I'd recommend looking for a module that does this. A quick google shows there are several out there. I don't want to recommend a particular one because I haven't used any of them.

提交回复
热议问题