I want to simulate Telnet using PHP. My problem is: I use proc_open to execuse command telnet. While running telnet, how can I send parameter for this command, example: open 192.168.1.1
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
proc_openis like a more flexiblepopenso to write to the process you use fwrite on the pipe.see the example #1 on http://uk.php.net/manual/en/function.proc-open.php